Jump to content

[SOLVED] Nested statement


eightFX

Recommended Posts

Hello everyone,

 

I am hoping I can get some help for the issue I am facing. I have two tables and need the data from table1 that is not in table2 and I do not want duplicates displayed. This is what I have so far that is not working:

 

$item_CG = mysql_query("SELECT *
FROM table1
WHERE item_no
NOT IN (SELECT item_number FROM table2) 
AND item_type = 'CG'");

 

 

Link to comment
https://forums.phpfreaks.com/topic/59096-solved-nested-statement/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.