Reputation: 499
$query = $query."AND `category` != '(1,2)') ORDER BY id DESC LIMIT $a , $b" ;
Long story short, can't find the right syntax for the above (1,2) and i don't want to write over with another AND because there may apear more values in future.
Hope somebody can help me ;).
Upvotes: 1
Views: 101
Reputation: 670
You should use NOT IN
operator.
$query = $query."AND `category` NOT IN (1,2)) ORDER BY id DESC LIMIT $a , $b" ;
Upvotes: 2