0ne Posted June 28, 2009 Share Posted June 28, 2009 How to use that request correctly? SELECT a.login_id, (SELECT * from details d WHERE d.reff=a.login_id) FROM login a I want 2nd SELECT to use login_id field from the 1st SELECT. How can I do this? Link to comment https://forums.phpfreaks.com/topic/164011-dont-know-how-to-use-select-correctly/ Share on other sites More sharing options...
dzelenika Posted June 28, 2009 Share Posted June 28, 2009 SELECT * from details d WHERE d.reff=(SELECT login_id FROM FROM login WHERE ...) Link to comment https://forums.phpfreaks.com/topic/164011-dont-know-how-to-use-select-correctly/#findComment-865209 Share on other sites More sharing options...
fenway Posted June 30, 2009 Share Posted June 30, 2009 Use a JOIN. Link to comment https://forums.phpfreaks.com/topic/164011-dont-know-how-to-use-select-correctly/#findComment-866646 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.