PHP Questions Home
Categories
Arrays
Files
Forms
Creating PDFs
PHP Errors
Functions
Images
MySQL
Numbers
Others
Strings
Website

PHP Forums
Forums Index
MySQL Forum
PHP Forum
Flash/Actionscript
Javascript
Web design

More PHP
PHP Functions
Top Questions
Ask a Question
PHP Interview Questions
PHP Jobs
Ecommerce
IT Questions
Business Websites

Sponsors

sponsor ad
My Salary
PHP Developer Salary
Advertise Here

How do I include a conditional in my mysql query?


You will usually need to apply some logic to the query that you apply to a table, and this is easily done with the WHERE keyword.

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'");
?>



ASK A QUESTION

More mysql PHP Questions

I need to test database time needed to execute scryp (like 10 000 inputs) with what command i can start measuring time, start scrypt, and then to stop time when scrypt is done and get time resault?

How do I find the ID of a new row added to a table?

how will use a mysql_query to get a single4 person list? With example.

How do I find second highest value from a table?

the code is running well without errors but y is it that three of the columns in the table do not insert data?



Custom Search