kellyrmartin Posted October 28, 2009 Share Posted October 28, 2009 I have an orderdetail table and a catalog item detail table. Before I allow a customer to submit an order I want to make sure all of the items in the order detail have a match in the catalog items table ( there are cases where an item was added to an order and then the item was removed from the catalog before the order was submitted). Can someone point me in the right direction on how to do this nicely? My initial thought it to cycle through all the orderdetail items ensuring there is a positivematch in the catalog items. Anyone? Quote Link to comment https://forums.phpfreaks.com/topic/179396-checking-the-content-of-one-recordset-against-another/ Share on other sites More sharing options...
fenway Posted October 31, 2009 Share Posted October 31, 2009 You just need a LEFT JOIN ..IS NULL to find the missing ones. Quote Link to comment https://forums.phpfreaks.com/topic/179396-checking-the-content-of-one-recordset-against-another/#findComment-948412 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.