note 43577 added to faq.databases
| From: | AthonSolo at rn2 dot php dot net | Date: | Sat, 26 Jun 2004 10:52:36 +0000 |
| Subject: | note 43577 added to faq.databases | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-71744@lists.php.net to get a copy of this message | ||
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;
}
?>
----
Manual Page -- http://www.php.net/manual/en/faq.databases.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+43577
Delete -- http://master.php.net/manage/user-notes.php?action=delete+43577&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+43577&report=yes
Search -- http://master.php.net/manage/user-notes.php