Using PHP/MySQL on Mac...

Have started using the tutorial found
[url]http://www.macromedia.com/devnet/dreamweaver/articles/php_cart.html[/url] on building
a simple php shopping cart. Got as far as adding items to the cart and got the
following error on the cart.php page:

mysql_fetch_row(): supplied argument is not a valid MySQL result resource in
/directory/cart.php on line 45

The code with line numbers referred to is below.

This is my first php site and have been using cPanel with phpmyadmin on my web
host - it's possible I've missed something but dunno where to look - not sure
if this is enough for someone to spot what might cause this error. Any help
would be greatly appreciated, thanks!!

Danny.



44 $result = mysql_query("select count(*) from cart where cookieId = '" .
GetCartId() . "' and itemId = $itemId");
45 $row = mysql_fetch_row($result);
46 $numRows = $row[0];