PHP MYSQL SELECT
The select statement is the basic command which grabs data from the database. The select statement can be very basic or more advanced. A basic select statement would grab all data from one database table and output it in a list or table.
Writing a Basic PHP MYSQL Select Statement
The basic SELECT statement can only take place when you connect and select a database. Once you have done that, you can select data.
$db = db_connect();
$command = “SELECT * FROM table_sort ” ;
$result= mysqli_query($db, $command);
$row = mysqli_fetch_assoc($result);
$last = $row[’email’];
echo “”.$first.” “.$email;