The WHERE clause is used to extract only those records that fulfill a specified criterion.
Syntax
SELECT column_name(s) |
To learn more about SQL, please visit our SQL tutorial.
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.
Example
The following example selects all rows from the "Persons" table where "FirstName='Peter':
< ?php |
The output of the code above will be:
Peter Griffin |