I've been trying to do this for a while but havn't got anywhere
I have this sql query
SELECT DISTINCT `deck` FROM `cards` where `deck` != '' and `deny` = '1' and created = 1 ORDER BY `deck` ASC
which is fine, but i want to be able to check in another table (game_freebies) to see if the data has already been entered (it would be in either set1 or set2)
Example
In cards the sql brings up these decks (they appear in a drop down box)
boldone
chapter21
future
ready
trio
uncivilised
chapter21 and future exist in game_freebies so i dont want them being shown
I think the sql query needs to be changed to check the other table, but i'm unsure
So i tried changing to SQl, but obviously i've made a mistake with it
SELECT DISTINCT deck FROM cards WHERE `deck` != '' and `deny` = '1' and created = 1
AND deck NOT IN (SELECT set1, set2 FROM game_freebies)
error:
#1241 - Operand should contain 1 column(s)