Code: Select all
$resultrccheck = mysql_query ("SELECT rcstock, photoprimary, price, title FROM products WHEREcode = '$codetick' AND stock = 'in stock'");
$num_rcstock = mysql_num_rows($resultrccheck);
if ($num_rcstock == 1)
{Code: Select all
$num_rcstock = mysql_num_rows($resultrccheck); This is the error. It's pointing at that second line.[15-Apr-2013 07:22:54] PHP Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/site/public_html/includes/product.inc on line 1267
Over the weekend when this script would have been run thousands of times, I've only had 68 errors.... but I want none. (don't we all).
So is there a more "up to date" way to do this please?