AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   MySQL Syntax Error (https://forums.alliedmods.net/showthread.php?t=312741)

Croxeye. 12-14-2018 17:11

MySQL Syntax Error
 
Error:
Code:

Load Query failed. [1064] You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '60), ' min') AS time_played_string, COUNT(*) AS total_players FROM blackcartel.p' at line 1
L 12/14/2018 - 21:59:54: [MySQL] No result set in this query!
L 12/14/2018 - 21:59:54: [AMXX] Displaying debug trace (plugin "BlackCartel.amxx")
L 12/14/2018 - 21:59:54: [AMXX] Run time error 10: native error (native "SQL_ReadResult")
L 12/14/2018 - 21:59:54: [AMXX]    [0] BlackCartel.sma::MySQL_Show_Rank (line 751)

Query
PHP Code:

SELECT (SELECT Count(*) FROM `player` AS p2 WHERE p2.xp p1.xp) + AS player_positionCONCAT(((p1.time_played 10DIV 60), ' h ', ((p1.time_played 10) % 60), ' min') AS time_played_stringCOUNT(*) AS total_players FROM blackcartel.player AS p1 WHERE p1.nick '%s'", g_player[cId][nick]); 

When I run this query in mysql workbench I don't have any errors and I get correct response. What version of mysql client is in 1.8.2 ?


All times are GMT -4. The time now is 07:29.

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