How do I include a conditional in my mysql query?
This will be followed by a fieldname, or list of them, and then the condition you want to be met.
Thus if you want to select only rows from a table WHERE the user is called Quentin you would do the follow:
<?php
$peeps = mysql_query("SELECT * FROM users WHERE firstname = 'Quentin'");
?>
More mysql PHP Questions
How do I find the ID of a new row added to a table?How do I limit the number of rows returned?
How do I find second highest value from a table?
How do I delete a row from a table?
How do I set a default value for ENUM fields in PHP?