This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.somsakelect.sqltesting; | |
import android.app.ProgressDialog; | |
import android.support.annotation.NonNull; | |
import android.support.v7.app.AppCompatActivity; | |
import android.os.Bundle; | |
import android.util.Log; | |
import android.view.View; | |
import android.widget.AdapterView; | |
import android.widget.ArrayAdapter; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
tools:context=".MainActivity"> | |
<TextView | |
android:id="@+id/name" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//Thank SQL: https://www.w3schools.com/sql/sql_delete.asp | |
// https://www.tutorialspoint.com/mysqli/mysqli_delete_query.htm | |
$servername = "localhost"; //ใช้ localhost กรณี server อยู่บน online | |
$username = "พิมพ์ที่นี่"; //username ของ DirectAdmin | |
$password = "พิมพ์ที่นี่"; //password ของ DirectAdmin | |
$dbname = "test"; //ชื่อ database |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//Thank SQL: https://www.w3schools.com/sql/sql_where.asp | |
$servername = "localhost"; //ใช้ localhost กรณี server อยู่บน online | |
$username = "พิมพ์ที่นี่"; //username ของ DirectAdmin/phpMyAdmin | |
$password = "พิมพ์ที่นี่"; //password ของ DirectAdmin/phpMyAdmin | |
$dbname = "test"; //ชื่อ database | |
// Create connection |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//Thank: https://www.w3schools.com/php/php_mysql_insert.asp | |
$servername = "localhost"; //ใช้ localhost กรณี server อยู่บน online | |
$username = "พิมพ์ที่นี่"; //username ของ DirectAdmin/phpMyAdmin | |
$password = "พิมพ์ที่นี่"; //password ของ DirectAdmin/phpMyAdmin | |
$dbname = "test"; //ชื่อ database | |
// Create connection |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$servername = "localhost"; //ใช้ localhost กรณี server อยู่บน online | |
$username = "พิมพ์ที่นี่"; //username ของ DirectAdmin/phpMyAdmin | |
$password = "พิมพ์ที่นี่"; //password ของ DirectAdmin/phpMyAdmin | |
$dbname = "test"; //ชื่อ database | |
// Create connection | |
$conn = new mysqli($servername, $username, $password, $dbname); | |
// Check connection | |
if ($conn->connect_error) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MainActivity extends AppCompatActivity { | |
TextView readText; | |
EditText writeText; | |
String name = "Test"; | |
String TAG = "Main"; | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
tools:context=".MainActivity"> | |
<TextView | |
android:id="@+id/textView" | |
android:layout_width="wrap_content" |