Warning: mysql_num_rows(): [SOLVED]
Posted: Mon Jun 12, 2006 10:57 am
I am getting the error:
Any ideas why?
with this:Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/public_html/add.php
Code: Select all
$owner = 'me';
$name = 'toast';
//All of the other vairables come from the previous part of the code
$get_total = @mysql_query("SELECT Name FROM `items` WHRER Owner='{$owner}' AND Name='{$name}' ");
$total = mysql_num_rows($get_total);
echo "<b> $name</b> have been added to <B>$owner</b> a total of<b> <u>$quantity times.</u></b> Now there are $total items of this type in $owner.<br>";