php - How to select rows where the ID exists in one table, but not another? -


i have 2 tables:

1) order table (which has ordernumber id)

2) items table can have multiple rows , has ordernumber column tying each row ord er row above.

most orders have multiple rows in items table - not , need pull report of orders no associated items rows.

i on 2 queries in php there smarter way in mysql. understand joins that's when there data in both tables. how tackle if there isn't tie in both?

i use left outer join or full outer join, depending on need.. if post 2 queries, or sample data...

outer handles data isn't there

here link out: http://www.codinghorror.com/blog/2007/10/a-visual-explanation-of-sql-joins.html


Comments

Popular posts from this blog

php - mySql Join with 4 tables -

css - Text drops down with smaller window -

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -