curtis_b Posted January 4, 2007 Share Posted January 4, 2007 I'm bangin my head against the wall on this one:SELECT * FROM 7cp.LabelOrders LEFT JOIN (7cp.LabelCatalog, 7cp.LabelOrders_Common, 7cp.Locations, 7cp.Serials, 7cp.LabelCatalog_Plates, 7cp.Production) ON ( LabelCatalog.RevisionID = LabelOrders.RevisionID AND LabelCatalog.LabelID = LabelOrders.LabelID AND LabelOrders_Common.PO = LabelOrders.PO AND Locations.LocationID = LabelOrders_Common.ReceiverID AND Serials.Serial = LabelOrders.Serial AND LabelCatalog_Plates.LabelID = LabelOrders.LabelID AND LabelCatalog_Plates.RevDateID = LabelOrders.RevDateID AND Production.Serial = LabelOrders.Serial ) WHERE LabelOrders.Serial = 85 LIMIT 0,1**The above query WORKS, but most of the data returned comes back as null when there should be data. Through assembling the query peice by peice, I've found out that the problem is with the LabelCatalog_Plates table. That is, if I remove that table from the join (and the relationships) the data expected comes back, yet if I include it, most columns returned (that DO have data) come back as null. If anyone can offer suggestions - I appreciate your help. Curt Link to comment https://forums.phpfreaks.com/topic/32883-solved-need-query-help/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.