Jump to content

trying to exclude something from table


jeff5656

Recommended Posts

I want to run a query on table 1 but exclude records if the field v3 matches the field "mrn" in table 2:

 

I was told to use LEFT OUTER JOIN but this doens't work:

 

Code: 
SELECT * FROM pts LEFT OUTER JOIN p_list ON pts.v3 = p_list.mrn WHERE pts.v3 IS NULL

 

When I do that nothing is displayed.  I don't know if the "IS NULL" term is the problem.  Can someone help me with what the php code is to make that query work?

 

Link to comment
https://forums.phpfreaks.com/topic/221240-trying-to-exclude-something-from-table/
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.