acidglitter Posted March 23, 2008 Share Posted March 23, 2008 does anyone see why this doesn't work? SELECT *, (SELECT name FROM members WHERE member_id = forum.started_by) AS 'startedby_name' FROM forum Quote Link to comment https://forums.phpfreaks.com/topic/97498-tiny-subquery-problem/ Share on other sites More sharing options...
mwasif Posted March 23, 2008 Share Posted March 23, 2008 There is no problem with the query. why this doesn't work? What do you mean? Quote Link to comment https://forums.phpfreaks.com/topic/97498-tiny-subquery-problem/#findComment-498931 Share on other sites More sharing options...
Barand Posted March 23, 2008 Share Posted March 23, 2008 this is a lot more efficient SELECT f.*, m.name FROM forum f INNER JOIN members m ON f.started_by = m.member_id Quote Link to comment https://forums.phpfreaks.com/topic/97498-tiny-subquery-problem/#findComment-498935 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.