Tag Archives: Firstname Lastname

Select Records using PHP MySQL Select Statement

online tutorilas




You can use SELECT statement to select data from a database. Syntax SELECT column_name(s) FROM table_name To get PHP to execute the statement above we must use the mysql_query() function. This function is used to send a query or command to a MySQL connection. For Example: The following example selects all the data stored in the “student” table (The * character selects all the data in the table): <?php $con = mysql_connect(“localhost”,”username”,”password”); if (!$con) { die(‘Could not connect: ‘ . […]