Quote:
Warning: mysql_numrows(): supplied argument is not a valid MySQL result resource in /home/prophot/public_html/order/cart.php on line 150
|
That's the error I get.
This is the block of code in that area:
PHP Code:
<?php
$itemname = $row_callitems['itemname'];
$addedsize = "SELECT * items WHERE userid = $userid AND itemname = $itemname AND original = '0'";
$result = mysql_query($addedsize);
$num = mysql_num_rows($result);
mysql_close();
$i=0;
while ($i < $num) {
$size=mysql_result($result,$i,"size");
$paper=mysql_result($result,$i,"paper");
$quantity=mysql_result($result,$i,"quantity");
?>
Line 150 is "$num = mysql_num_rows($result);" so I assume something is wrong with line 149? Which is the $addedsize variable. I updated the txt file that has the entire code. Help would be greatly appreciated, thank you.
Just so you'd know, this loop is inside a repeat region generated by Dreamweaver. Could that be a cause of the problem?
~RB