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 access the current time with mysql?how can I show an image from mysql?
How do I return a random row from the database?
I am extracting data from a MySQL Database of which one of the data stored is seperated by a comma. For example, step1,go here,step 2,go there,step 3,go back etc etc. I want to know how to split the data at the comma and format it in html. Using the split
How do I return the date with mySQL?
