note 43577 deleted from faq.databases by tomsommer
| From: | tomsommer@php.net | Date: | Sun, 27 Jun 2004 02:00:04 +0000 |
| Subject: | note 43577 deleted from faq.databases by tomsommer | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-71841@lists.php.net to get a copy of this message | ||
Note Submitter: Athon Solo
----
With regards to FAQ #6, it is also often useful to be able to see the exact query being sent to
mysql, especially when using variables in your query. This can be achieved using something similar
to the following:
<?php
$query = "SELECT * FROM tables_priv";
$result = mysql_query($query);
if (!$result) {
echo 'Query: '. $query .' <br>Error: '. mysql_error();
exit;
}
?>