Posted by Surfer! on 07/07/06 20:29
In message <1152298662.687030.90690@p79g2000cwp.googlegroups.com>, Adam
Plocher <aplocher@gmail.com> writes
>Also another debug technique you might want to try is to echo the
>$query before passing it into mysql_query(), then copy and paste the
>outputted query into a SQL client and see what errors it provides.
>Sometimes a stand-alone SQL client will provide more verbose messages
>than PHP. Plus seeing the query that PHP is generating can help you
>quickly spot errors in the query.
<Snip>
I echo it as part of the error message, for example:
$query1 = code here to build the SQL query;
$result1 = mysql_query( $query1 )
or die ( $query1 . "<p>" . mysql_error() . "</p><p>Query 1
failed<p>");
while( $head = mysql_fetch_object( $result1 ) )
etc.
If it works I don't need to see it.
--
Surfer!
Email to: ramwater at uk2 dot net
[Back to original message]
|