AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   SQL Query error (https://forums.alliedmods.net/showthread.php?t=295209)

iNvectus 03-19-2017 10:32

SQL Query error
 
Hello.I would like to ask where is the mistake here?
PHP Code:

formatexszQuerycharsmaxszQuery ), "SELECT user_name FROM ph_users WHERE user_id IN (%s) ORDER BY FIELD(user_id,%s)"szBufferszBuffer ); 

Because in HLDS I have error like that:
Quote:

L 03/19/2017 - 16:24:02: [MySQL] Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ') ORDER BY FIELD(user_id,)' at line 1.
Where am I doing a mistake?

Bugsy 03-19-2017 12:25

Re: SQL Query error
 
Need to know value of szBuffer

Also, try ORDER BY user_id

iNvectus 03-20-2017 06:10

Re: SQL Query error
 
Quote:

Originally Posted by Bugsy (Post 2504830)
Need to know value of szBuffer

Also, try ORDER BY user_id

Worked when I did it like this..Lmao something so simple..


All times are GMT -4. The time now is 18:04.

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