Reputation: 2291
For example I have the query:
$legend= mysql_num_rows(mysql_query("SELECT * FROM users WHERE rank = 'Legend' AND status='Alive' AND userlevel <> '2'"));
I need to know how you do the excluding sign, because it seams that <>
is not correct.
Upvotes: 1
Views: 3276
Reputation: 2622
SELECT *
FROM users
WHERE rank = 'Legend'
AND status='Alive'
AND userlevel != '2'
Upvotes: 1
Reputation: 269
Try like this
$legend= mysql_num_rows(mysql_query("SELECT * FROM users WHERE rank = 'Legend' AND status='Alive' AND userlevel !='2'"));
This will query results having rank
as Legend
and status
as Alive
excluding userlevel
with 2
Upvotes: 1
Reputation: 3953
$legend= mysql_num_rows(mysql_query("SELECT * FROM users WHERE rank = 'Legend' AND status='Alive' AND userlevel != '2'"));
This should do the trick if i understood you correctly.
Upvotes: 1