The Arcive of vBulletin Modifications Site. |
|
Details »»
|
|||||||||||||||||||||||||
Hiyis,
How do I state in an SQL query that I want to get all results EXCEPT those with a particular value? EG: SELECT * FROM forum,othertable WHERE displayorder<>0 AND active=1 AND forumid!=othertablefield This isn't working, so I'm assuming that's incorrect useage... IS it possible? (ie, I want all results except those where forumid matches the value in othertablefield) Thanks ![]() Mark Show Your Support
|
|||||||||||||||||||||||||
| Comments |
|
#2
|
||||
|
||||
|
You use <> to signify NOT EQUAL, not !=.
|
|
#3
|
||||
|
||||
|
Ah-ha! Thanks Freddie
|
|
#4
|
||||
|
||||
|
Although != also works (or at least on some versions of MySQL).
|
|
#5
|
||||
|
||||
|
Neither is working for me, tho I'm guessing it's the way I'm wording the SQL call rather than using <> or !=
I shall struggle on
|
![]() |
|
|