sw0o0sh Posted May 10, 2010 Share Posted May 10, 2010 Everything was going great until I decided to be specific with the select. Ignore my variable naming, it's how a specific forums I use queries the database. I basically need to select everything from `rscd_players`, everything from `rscd_experience`, but only ONE thing as listed from `users`. Doesn't Work: SELECT rscd_players(*), rscd_experience(*), users.username AS 'test' FROM rscd_players JOIN users ON rscd_players.owner = users.id JOIN rscd_experience ON rscd_players.user = rscd_experience.user WHERE rscd_players.username = '" . $db->escape($user_search) . "' LIMIT 0 , 1 Works (but not specific to my needs) SELECT * FROM rscd_players JOIN users ON rscd_players.owner = users.id JOIN rscd_experience ON rscd_players.user = rscd_experience.user WHERE rscd_players.username = '" . $db->escape($user_search) . "' LIMIT 0 , 1 Link to comment https://forums.phpfreaks.com/topic/201257-whats-wrong-with-this-query-select-issue-on-a-joined-query/ Share on other sites More sharing options...
sw0o0sh Posted May 10, 2010 Author Share Posted May 10, 2010 Lol nvm I figured it out, I had to do rscd_players.* not (*) Link to comment https://forums.phpfreaks.com/topic/201257-whats-wrong-with-this-query-select-issue-on-a-joined-query/#findComment-1055816 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.