i cant seem to get my head round this one.
$numresults = mysql_query("SELECT * FROM products where prod_ID like $ID_RES"); // the query.
$numrows = mysql_num_rows($numresults); // Number of rows returned from above query.
if ($numrows < "0") { $pic_num = "1"; } else { $pic_num = $numrows++; }
echo "pic number is $pic_num";
i want it to check if theres products if there isnt $pic_num wants to be 1 and then next time it would 2,3,4,5 etc...