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'");
?>
Comment on this Question and Answer >>>
ASK A QUESTION
More mysql PHP Questions
How do I update the contents of a table row?What is difference between mysql_fetch_array and mysql_fetch_object?
How do I find second highest value from a table?
My website www.quicheandpie.com has navigation buttons which were added by going to admin/categorylist and adding a category. I can add category = navigation buttons and update them, but I can not delete them. Any ideas how I can find where the info
What is the correct way to connect to a MySQL database?
