May 2003
Intermediate to advanced
592 pages
14h 28m
English
Once you have successfully connected to and selected a database, you can start performing queries. These queries can be as basic as inserts, updates, and deletions or as involved as complex joins returning numerous rows. In any case, the PHP function for executing a query is mysql_query():
$result = mysql_query($query);
For simple queries like INSERT, UPDATE, DELETE, etc. (which do not return records), the $result variable will be either TRUE or FALSE based upon the successful execution of the query on the database. For complex queries that do return records (SELECT, SHOW, DESCRIBE, and EXPLAIN), the $result variable will contain the results of the query if it worked or be FALSE if it did not.
One final, albeit optional, ...
Read now
Unlock full access