I have a select query
if ( $Designer == "" and $Product_Type == "" and $BoyGirl == "" ) $result = mysql_query("SELECT * FROM products WHERE Sale_Item='n' and Teens='n' ORDER BY '$OrderBy'" ,$db);
Ok this work well and fine but when I add the Limit predicate it screws this up.
I am using Limit in the above code as follows.
if ( $Designer == "" and $Product_Type == "" and $BoyGirl == "" ) $result = mysql_query("SELECT * FROM products LIMIT (0,20) WHERE Sale_Item='n' and Teens='n' ORDER BY '$OrderBy'" ,$db);
I have tried it without the brackets round the 0,20 as well.
The error I get is with the following line (well according to the error message I get within the browser anyway)
if ($myrow = mysql_fetch_array($result)) {
am I not allowed to use an array with the limit?