PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
$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>";
Any ideas why?
Last edited by tecktalkcm0391 on Mon Jun 12, 2006 11:14 am, edited 1 time in total.
$get_total = mysql_query("SELECT Name FROM `items` WHRER Owner='{$owner}' AND Name='{$name}' ") or die mysql_error();
When you're developing, never use the @ directive to remove errors. It'll just make you wonder where errors are arising. Add it in later if you really have to use it.
//The original was:
mysql_query("SELECT Name FROM `items` WHRER Owner='{$owner}' AND Name='{$name}'
//But I mistyped WHERE, so now this works:
mysql_query("SELECT Name FROM `items` WHERE Owner='{$owner}' AND Name='{$name}'