Hi. My web host recently upgrading my account and now one of my php scripts no longer works (It is now PHP 4.3.10). It is for a shopping cart program. The items are divided into brochures and categories. I need to pull information from the mysql db based on the brochure and category. Here is the line that seems to be giving me trouble:
$newsql = "SELECT * FROM item WHERE cat = '$ctg' AND BrochID = '$BrochID'";
$newres = mysql_query($newsql,$db);
$num = mysql_num_rows($newres);
I know that the correct variables are being passed as I am echoing them to the screen to debug. $num is coming back as 0.
I am able to pull the cat column from the database with the following code earlier in the script:
$ct = "SELECT DISTINCT cat FROM item WHERE BrochID = '$BrochID'";
$result = mysql_query($ct, $db);
$num = mysql_num_rows($result);
Any suggestions would be greatly appreciated.