Php Database Queries Tutorial
There are three main types of query you are likely to need to execute on your mySQL database from within your PHP scripts:
- select - select and return rows from the database
- insert - insert new rows in to a database table
- update - update the information stored in a row
- delete - remove a row from the database entirely
All of these queries can be executed using the mysql_query() function. The function will return false if the query fails for some reason, and true if it succeeds. In the case of a select query, the mysql_query() function will return a resource identifier if it succeeds which can then be used to access the data returned by the query. In any case, a resource identifier evalutes to "true" in PHP so a true return value will always indicate a successful query.

