bwcc Posted March 27, 2007 Share Posted March 27, 2007 Currently, this is my join: SELECT * FROM mso_record LEFT JOIN mso_problem ON mso_record.tracking=mso_problem.tracking ORDER BY 1 DESC This will pick all of mso_record and match them with all records in mso_problem where tracking is the same. I am wanting to change that to where it only picks the first record in mso_problem where tracking is the same. Any ideas? TIA Link to comment https://forums.phpfreaks.com/topic/44489-help-with-a-join-select-all-table-1-and-first-entry-on-table-2/ Share on other sites More sharing options...
fenway Posted April 4, 2007 Share Posted April 4, 2007 ORDER BY 1 won't really do anything... you need LIMIT 1, but without a real order by clause, you'll just get a quasi-recent one. Link to comment https://forums.phpfreaks.com/topic/44489-help-with-a-join-select-all-table-1-and-first-entry-on-table-2/#findComment-221159 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.