I have a query
mysql_select_db($database_beau, $beau);
$query_Recordset1 = "SELECT * FROM beauProd ORDER BY name ASC";
$query_limit_Recordset1 = sprintf("%s LIMIT %d, %d", $query_Recordset1, $startRow_Recordset1, $maxRows_Recordset1);
$Recordset1 = mysql_query($query_limit_Recordset1, $beau) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
but need to add a where clause to exclude a catID = 21 rather than include
any pointers
thanks
how to exclude a category in where clause
Moderator: General Moderators
-
jonnyfortis
- Forum Contributor
- Posts: 462
- Joined: Tue Jan 10, 2012 6:05 am
Re: how to exclude a category in where clause
Code: Select all
SELECT column1, column2, column3
FROM beauProd
WHERE catID != 21
ORDER BY name ASC
LIMIT foo, bar-
jonnyfortis
- Forum Contributor
- Posts: 462
- Joined: Tue Jan 10, 2012 6:05 am
Re: how to exclude a category in where clause
thats great
thanks so much for your help
thanks so much for your help