unknown php-mysql UPDATE error :/
Posted: Sat May 17, 2003 4:42 pm
weird little problem here :/
im trying to do an update, the query is:
Now ive phpmyadmin open at the same time, and ive tried that exact same query in phpm.a. and it worked
but when i run it in php i get
Can someone please put me out of my misery and tell me why a query that works in phpmyadmin doesnt work in php itself 
im trying to do an update, the query is:
Code: Select all
UPDATE users SET reg_date = reg_date, rate_num = rate_num + 1, rate_sum = rate_sum + 5 WHERE id = '920c13683f0c4ca048b68640f3ec1078'but when i run it in php i get
The php is:UPDATE users SET reg_date = reg_date, rate_num = rate_num + 1, rate_sum = rate_sum + 5 WHERE id = '920c13683f0c4ca048b68640f3ec1078'
Warning: Supplied argument is not a valid MySQL result resource in /home/httpd/vhosts/uo-auction2.com/httpdocs/bfeedback.php on line 169
Abnormal database error.
Code: Select all
<?php
$query5 = 'UPDATE ' . $tableusers . ' SET reg_date = reg_date, rate_num = rate_num + 1, rate_sum = rate_sum + ' . $HTTP_POST_VARS[rate] . " WHERE id = '" . $target . "'";
$result5 = mysql_query($query5);
echo $query5;
if(mysql_num_rows($result5)<1)//line 169
{
echo 'Abnormal database error.<br>' . mysql_error();
exit;
}
?>