JakeMogul Posted December 15, 2012 Share Posted December 15, 2012 I'm making a page which shows from a table only items that are cheapest from a certain supplier using <. The problem I'm encountering is that the prices are stored in a different table, a master price list. I have a query SELECT * FROM tablename WHERE column1 < column 2 but the WHERE part of the clause needs to apply to a different table than the table I'm selecting records from. Link to comment https://forums.phpfreaks.com/topic/272015-choosing-records-from-one-table-depending-on-criteria-in-a-different-table/ Share on other sites More sharing options...
Barand Posted December 15, 2012 Share Posted December 15, 2012 Then you need to JOIN that table to the other one http://www.phpfreaks.com/tutorial/data-joins-unions Link to comment https://forums.phpfreaks.com/topic/272015-choosing-records-from-one-table-depending-on-criteria-in-a-different-table/#findComment-1399473 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.