dazz_club Posted July 15, 2008 Share Posted July 15, 2008 Hi people,I have two tables that i would like to connect to eachother for the purpose of displaying a products information.1st tablemy first table containts all the products, name, image, type, etc2nd tablecontains further information for a particular producteach table as a common field called "thermaxID"currently i am using this sql statment-----------SELECT * FROM thermaxRange LEFT JOIN thermaxLabelRangeON thermaxRange.thermaxID = thermaxLabelRange.thermaxID -----------what is happening at the moment is that all the products are be listed from top to bottom, and then table that has more product information is also being displayed like that. What i would like to happen is for the product information from table 2 to be shown next to its correct product from table 1.kind regardsDazzclub Link to comment Share on other sites More sharing options...
aalbetski Posted July 15, 2008 Share Posted July 15, 2008 You can arrange the order like this:SELECT t1.onefield, t2.onefield, t1.anotherfield, t2.anotherfield FROMthermaxRange as t1LEFT JOIN thermaxLabelRange as t2ON t1.thermaxID = t2.thermaxID and so onnote, I removed the "*" Link to comment Share on other sites More sharing options...
dazz_club Posted July 15, 2008 Author Share Posted July 15, 2008 Hi there,Your right, i read more about it so i changed the original statement to;SELECT thermaxRange.productName, thermaxRange.productIMG, thermaxLabelRange.range FROM thermaxRange LEFT JOIN thermaxLabelRange ON thermaxRange.thermaxID = thermaxLabelRange.thermaxIDi think that statement along with your one helps me rule out this causing the problem..it must be my cfoutput tags.cheersDarren Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.