You are here: Re: How to debug PHP's mysql_query() function? « PHP Programming Language « IT news, forums, messages
Re: How to debug PHP's mysql_query() function?

Posted by John Moore on 11/02/05 21:26

On Wed, 02 Nov 2005 19:09:25 GMT, in comp.lang.php Oli Filth
<catch@olifilth.co.uk> wrote:


>
>Without seeing the function, it's difficult to say!
>
>Have you tried getting the function to echo the query string that it
>creates, and comparing that to what you expect?

Like I said, I got rid of the function. Now I'm just dealing with this
snippet of code which won't execute:

mysql_query("UPDATE about SET category_id=63 WHERE about_id=5") or
trigger_error(mysql_error(), E_USER_ERROR);

I'm running it exactly like that.

I also tried it like this:

$update = mysql_query("UPDATE about SET category_id=63 WHERE
about_id=5") or trigger_error(mysql_error(), E_USER_ERROR);
if (!$update) {
echo 'Error: ' . mysql_error();
}
echo '<hr>Info: ';
mysql_info($update);
echo '<hr>';

mysql_info returns a warning:

Warning: mysql_info() expects parameter 1 to be resource, boolean
given in c:\Path\to\script.php on line 384

Thanks,

J Moore

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация