Raised This Month: $ Target: $400
 0% 

SQL subquery returns more than 1 row (1242)


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 07-16-2020 , 17:46   Re: SQL subquery returns more than 1 row (1242)
Reply With Quote #7

You would not be able to trust the results if more than 1 record is returned since the data should be specific to 1 player so I do not recommend using the LIMIT 1 statement.

Instead of using name, use steam id as this field is unique to a player and you will only get 1 result.

Code:
SELECT csgo_clans_applications.name, rcsgo_player.points, csgo_ranks.rank

FROM (csgo_clans_applications

LEFT JOIN rcsgo_player 
ON csgo_clans_applications.steamid = rcsgo_player.steamid)

LEFT JOIN csgo_ranks
ON csgo_clans_applications.steamid = csgo_ranks.steamid

WHERE clan = '%i' 

ORDER BY rank DESC, points DESC
__________________

Last edited by Bugsy; 07-16-2020 at 21:43.
Bugsy is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 13:44.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode