PHP n MySQL help..
i need a bit of help in mysql using php..
i wanted to display any of the result of the 1st query that did not match the result of the 2nd query only..
so for example, if the result of query 1 is 14, 15, 16, 17, 18..
and the result of query 2 is 15,16..
i wanted to display only 14,17,18...
any suggestions on how i should do the queries?
hope the explanation is quite helpful..
any help and suggestions will be very appreciated..
thank you guys..
so if the column you're returning is "id" then..
query 1 where id not in query 2.
ehm.. yeah.. but the thing is,
how do you do the "not in" query 2 thing?
i mean the proper php/mysql code..
it is literally "ID NOT IN"
select id from table where id not in (select id from other_table)
no php required.
ah! kewl chazzy.. thanks alot..
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)