Error mysql
#1

PHP код:
[03:25:08] [ERRORCMySQLQuery::Execute[] - (error #1064) 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 '' at line 1
[03:25:08] [DEBUGCMySQLQuery::Execute[] - error will be triggered in OnQueryError 
please help
Reply
#2

Show your SQl query. Is it possible you put an extra comma.
Reply
#3

PHP код:
    mysql_format(mysqlquerysizeof(query), "UPDATE `database` SET `pEXP` = %d, `Premium` = %d, `pAdminLevel` = %d,",
    
pInfo[playerid][pEXP], pInfo[playerid][Premium], pInfo[playerid][pAdminLevel]);
    
mysql_tquery(mysqlquery""""); 
Reply
#4

Код:
mysql_format(mysql, query, sizeof(query), "UPDATE `database` SET `pEXP` = %d, `Premium` = %d, `pAdminLevel` = %d,",
pInfo[playerid][pEXP], pInfo[playerid][Premium], pInfo[playerid][pAdminLevel]);
mysql_tquery(mysql, query, "", "");
Reply
#5

Where's the rest of it? A database isn't like a file. You need to specify which row(s) you want to update otherwise it will just ruin all rows in the database.
Reply
#6

[03:57:23] [DEBUG] CMySQLQuery::Execute[] - starting query execution
[03:57:23] [ERROR] CMySQLQuery::Execute[] - (error #1064) 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 '' at line 1
[03:57:23] [DEBUG] CMySQLQuery::Execute[] - error will be triggered in OnQueryError

error try
Reply
#7

PHP код:
[03:40:14] [DEBUGmysql_connect host"localhost"user"root"database"database"password"****"port3306autoreconnecttruepool_size2
[03:40:14] [DEBUGCMySQLHandle::Create creating new connection..
[
03:40:14] [DEBUGCMySQLHandle::CMySQLHandle constructor called
[03:40:14] [DEBUGCMySQLHandle::Create connection created (id1)
[
03:40:14] [DEBUGCMySQLConnection::Connect establishing connection to database...
[
03:40:14] [DEBUGCMySQLConnection::Connect connection was successful
[03:40:14] [DEBUGCMySQLConnection::Connect auto-reconnect has been enabled
[03:40:14] [DEBUGmysql_errno connection1
[03:40:14] [DEBUGCMySQLConnection::Connect establishing connection to database...
[
03:40:14] [DEBUGCMySQLConnection::Connect establishing connection to database...
[
03:40:14] [DEBUGCMySQLConnection::Connect connection was successful
[03:40:14] [DEBUGCMySQLConnection::Connect connection was successful
[03:40:14] [DEBUGCMySQLConnection::Connect auto-reconnect has been enabled
[03:40:14] [DEBUGCMySQLConnection::Connect auto-reconnect has been enabled
[03:40:14] [DEBUGCMySQLConnection::Connect connection was successful
[03:40:14] [DEBUGCMySQLConnection::Connect auto-reconnect has been enabled
[03:40:38] [DEBUGmysql_format connection1len128format"SELECT `Password`, `ID` FROM `users` WHERE `Name` = '%e' LIMIT 1"
[03:40:38] [DEBUGmysql_tquery connection1query"SELECT `Password`, `ID` FROM `users` WHERE `Name` = 'damar' LIMI"callback"OnAccountCheck"format"i"
[03:40:38] [DEBUGCMySQLQuery::Execute[OnAccountCheck] - starting query execution
[03:40:38] [DEBUGCMySQLQuery::Execute[OnAccountCheck] - query was successfully executed within 0.396 milliseconds
[03:40:38] [DEBUGCMySQLResult::CMySQLResult() - constructor called
[03:40:38] [DEBUGCalling callback "OnAccountCheck"..
[
03:40:38] [DEBUGcache_get_data connection1
[03:40:38] [DEBUGcache_get_field_content row0field_name"Password"connection1max_len129
[03:40:38] [DEBUGCMySQLResult::GetRowDataByName row'0'field"Password"data"FD9D94340DBD72C11B37EBB0D2A19B4D05E00FD78E4E2CE8923B9EA3A54E900DF181CFB112A8A73228D1F3551680E2AD9701A4FCFB248FA7FA77B95180628BB2"
[03:40:38] [DEBUGcache_get_field_content_int row0field_name"ID"connection1
[03:40:38] [DEBUGCMySQLResult::GetRowDataByName row'0'field"ID"data"1"
[03:40:38] [DEBUGCMySQLResult::~CMySQLResult() - deconstructor called
[03:40:43] [DEBUGmysql_format connection1len100format"SELECT * FROM `users` WHERE `Name` = '%e' LIMIT 1"
[03:40:43] [DEBUGmysql_tquery connection1query"SELECT * FROM `users` WHERE `Name` = 'damar' LIMIT 1"callback"OnAccountLoad"format"i"
[03:40:43] [DEBUGCMySQLQuery::Execute[OnAccountLoad] - starting query execution
[03:40:43] [DEBUGCMySQLQuery::Execute[OnAccountLoad] - query was successfully executed within 0.315 milliseconds
[03:40:43] [DEBUGCMySQLResult::CMySQLResult() - constructor called
[03:40:43] [DEBUGCalling callback "OnAccountLoad"..
[
03:40:43] [DEBUGcache_get_field_content_int row0field_name"pAdminLevel"connection1
[03:40:43] [DEBUGCMySQLResult::GetRowDataByName row'0'field"pAdminLevel"data"0"
[03:40:43] [DEBUGcache_get_field_content_int row0field_name"Premium"connection1
[03:40:43] [DEBUGCMySQLResult::GetRowDataByName row'0'field"Premium"data"0"
[03:40:43] [DEBUGcache_get_field_content_int row0field_name"pEXP"connection1
[03:40:43] [DEBUGCMySQLResult::GetRowDataByName row'0'field"pEXP"data"0"
[03:40:43] [DEBUGCMySQLResult::~CMySQLResult() - deconstructor called
[03:41:38] [DEBUGmysql_format connection1len128format"SELECT `Password`, `ID` FROM `users` WHERE `Name` = '%e' LIMIT 1"
[03:41:38] [DEBUGmysql_tquery connection1query"SELECT `Password`, `ID` FROM `users` WHERE `Name` = 'damar' LIMI"callback"OnAccountCheck"format"i"
[03:41:38] [DEBUGCMySQLQuery::Execute[OnAccountCheck] - starting query execution
[03:41:38] [DEBUGCMySQLQuery::Execute[OnAccountCheck] - query was successfully executed within 0.435 milliseconds
[03:41:38] [DEBUGCMySQLResult::CMySQLResult() - constructor called
[03:41:38] [DEBUGCalling callback "OnAccountCheck"..
[
03:41:38] [DEBUGcache_get_data connection1
[03:41:38] [DEBUGcache_get_field_content row0field_name"Password"connection1max_len129
[03:41:38] [DEBUGCMySQLResult::GetRowDataByName row'0'field"Password"data"FD9D94340DBD72C11B37EBB0D2A19B4D05E00FD78E4E2CE8923B9EA3A54E900DF181CFB112A8A73228D1F3551680E2AD9701A4FCFB248FA7FA77B95180628BB2"
[03:41:38] [DEBUGcache_get_field_content_int row0field_name"ID"connection1
[03:41:38] [DEBUGCMySQLResult::GetRowDataByName row'0'field"ID"data"1"
[03:41:38] [DEBUGCMySQLResult::~CMySQLResult() - deconstructor called
[03:41:41] [DEBUGmysql_format connection1len100format"SELECT * FROM `users` WHERE `Name` = '%e' LIMIT 1"
[03:41:41] [DEBUGmysql_tquery connection1query"SELECT * FROM `users` WHERE `Name` = 'damar' LIMIT 1"callback"OnAccountLoad"format"i"
[03:41:41] [DEBUGCMySQLQuery::Execute[OnAccountLoad] - starting query execution
[03:41:41] [DEBUGCMySQLQuery::Execute[OnAccountLoad] - query was successfully executed within 0.523 milliseconds
[03:41:41] [DEBUGCMySQLResult::CMySQLResult() - constructor called
[03:41:41] [DEBUGCalling callback "OnAccountLoad"..
[
03:41:41] [DEBUGcache_get_field_content_int row0field_name"pAdminLevel"connection1
[03:41:41] [DEBUGCMySQLResult::GetRowDataByName row'0'field"pAdminLevel"data"0"
[03:41:41] [DEBUGcache_get_field_content_int row0field_name"Premium"connection1
[03:41:41] [DEBUGCMySQLResult::GetRowDataByName row'0'field"Premium"data"0"
[03:41:41] [DEBUGcache_get_field_content_int row0field_name"pEXP"connection1
[03:41:41] [DEBUGCMySQLResult::GetRowDataByName row'0'field"pEXP"data"0"
[03:41:41] [DEBUGCMySQLResult::~CMySQLResult() - deconstructor called
[03:49:25] [DEBUGmysql_connect host"localhost"user"root"database"database"password"****"port3306autoreconnecttruepool_size2
[03:49:25] [DEBUGCMySQLHandle::Create creating new connection..
[
03:49:25] [WARNINGCMySQLHandle::Create connection already exists
[03:49:25] [DEBUGCMySQLConnection::Connect establishing connection to database...
[
03:49:25] [DEBUGCMySQLConnection::Connect connection was successful
[03:49:25] [DEBUGCMySQLConnection::Connect auto-reconnect has been enabled
[03:49:25] [DEBUGmysql_errno connection1
[03:49:25] [DEBUGmysql_format connection1len128format"SELECT `Password`, `ID` FROM `users` WHERE `Name` = '%e' LIMIT 1"
[03:49:25] [DEBUGmysql_tquery connection1query"SELECT `Password`, `ID` FROM `users` WHERE `Name` = 'damar' LIMI"callback"OnAccountCheck"format"i"
[03:49:25] [DEBUGCMySQLConnection::Connect establishing connection to database...
[
03:49:25] [DEBUGCMySQLConnection::Connect connection was successful
[03:49:25] [DEBUGCMySQLConnection::Connect auto-reconnect has been enabled
[03:49:25] [DEBUGCMySQLQuery::Execute[OnAccountCheck] - starting query execution
[03:49:25] [DEBUGCMySQLConnection::Connect establishing connection to database...
[
03:49:25] [DEBUGCMySQLConnection::Connect connection was successful
[03:49:25] [DEBUGCMySQLConnection::Connect auto-reconnect has been enabled
[03:49:25] [DEBUGCMySQLQuery::Execute[OnAccountCheck] - query was successfully executed within 0.703 milliseconds
[03:49:25] [DEBUGCMySQLConnection::Connect establishing connection to database...
[
03:49:25] [DEBUGCMySQLResult::CMySQLResult() - constructor called
[03:49:25] [DEBUGCMySQLConnection::Connect connection was successful
[03:49:25] [DEBUGCMySQLConnection::Connect auto-reconnect has been enabled
[03:49:25] [DEBUGCalling callback "OnAccountCheck"..
[
03:49:25] [DEBUGcache_get_data connection1
[03:49:25] [DEBUGcache_get_field_content row0field_name"Password"connection1max_len129
[03:49:25] [DEBUGCMySQLResult::GetRowDataByName row'0'field"Password"data"FD9D94340DBD72C11B37EBB0D2A19B4D05E00FD78E4E2CE8923B9EA3A54E900DF181CFB112A8A73228D1F3551680E2AD9701A4FCFB248FA7FA77B95180628BB2"
[03:49:25] [DEBUGcache_get_field_content_int row0field_name"ID"connection1
[03:49:25] [DEBUGCMySQLResult::GetRowDataByName row'0'field"ID"data"1"
[03:49:25] [DEBUGCMySQLResult::~CMySQLResult() - deconstructor called
[03:50:00] [DEBUGmysql_format connection1len100format"SELECT * FROM `users` WHERE `Name` = '%e' LIMIT 1"
[03:50:00] [DEBUGmysql_tquery connection1query"SELECT * FROM `users` WHERE `Name` = 'damar' LIMIT 1"callback"OnAccountLoad"format"i"
[03:50:00] [DEBUGCMySQLQuery::Execute[OnAccountLoad] - starting query execution
[03:50:00] [DEBUGCMySQLQuery::Execute[OnAccountLoad] - query was successfully executed within 0.470 milliseconds
[03:50:00] [DEBUGCMySQLResult::CMySQLResult() - constructor called
[03:50:00] [DEBUGCalling callback "OnAccountLoad"..
[
03:50:00] [DEBUGcache_get_field_content_int row0field_name"pAdminLevel"connection1
[03:50:00] [DEBUGCMySQLResult::GetRowDataByName row'0'field"pAdminLevel"data"0"
[03:50:00] [DEBUGcache_get_field_content_int row0field_name"Premium"connection1
[03:50:00] [DEBUGCMySQLResult::GetRowDataByName row'0'field"Premium"data"0"
[03:50:00] [DEBUGcache_get_field_content_int row0field_name"pEXP"connection1
[03:50:00] [DEBUGCMySQLResult::GetRowDataByName row'0'field"pEXP"data"0"
[03:50:00] [DEBUGCMySQLResult::~CMySQLResult() - deconstructor called
[03:50:38] [DEBUGmysql_format connection1len128format"UPDATE `database` SET `pEXP` = %d, `Premium` = %d, `pAdminLevel` = %d,"
[03:50:38] [DEBUGmysql_tquery connection1query"UPDATE `database` SET `pEXP` = 0, `Premium` = 0, `pAdminLevel` ="callback"(null)"format"(null)"
[03:50:38] [DEBUGCMySQLQuery::Execute[] - starting query execution
[03:50:38] [ERRORCMySQLQuery::Execute[] - (error #1064) 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 '' at line 1
[03:50:38] [DEBUGCMySQLQuery::Execute[] - error will be triggered in OnQueryError
[03:50:50] [DEBUGmysql_connect host"localhost"user"root"database"database"password"****"port3306autoreconnecttruepool_size2
[03:50:50] [DEBUGCMySQLHandle::Create creating new connection..
[
03:50:50] [WARNINGCMySQLHandle::Create connection already exists
[03:50:50] [DEBUGCMySQLConnection::Connect establishing connection to database...
[
03:50:50] [DEBUGCMySQLConnection::Connect connection was successful
[03:50:50] [DEBUGCMySQLConnection::Connect auto-reconnect has been enabled
[03:50:50] [DEBUGmysql_errno connection1
[03:50:50] [DEBUGmysql_format connection1len128format"SELECT `Password`, `ID` FROM `users` WHERE `Name` = '%e' LIMIT 1"
[03:50:50] [DEBUGmysql_tquery connection1query"SELECT `Password`, `ID` FROM `users` WHERE `Name` = 'damar' LIMI"callback"OnAccountCheck"format"i"
[03:50:50] [DEBUGCMySQLConnection::Connect establishing connection to database...
[
03:50:50] [DEBUGCMySQLConnection::Connect connection was successful
[03:50:50] [DEBUGCMySQLConnection::Connect connection was successful
[03:50:50] [DEBUGCMySQLConnection::Connect auto-reconnect has been enabled
[03:50:50] [DEBUGCMySQLConnection::Connect auto-reconnect has been enabled
[03:50:50] [DEBUGCMySQLQuery::Execute[OnAccountCheck] - starting query execution
[03:50:50] [DEBUGCMySQLQuery::Execute[OnAccountCheck] - query was successfully executed within 0.384 milliseconds
[03:50:50] [DEBUGCMySQLResult::CMySQLResult() - constructor called
[03:50:50] [DEBUGCalling callback "OnAccountCheck"..
[
03:50:50] [DEBUGcache_get_data connection1
[03:50:50] [DEBUGcache_get_field_content row0field_name"Password"connection1max_len129
[03:50:50] [DEBUGCMySQLResult::GetRowDataByName row'0'field"Password"data"FD9D94340DBD72C11B37EBB0D2A19B4D05E00FD78E4E2CE8923B9EA3A54E900DF181CFB112A8A73228D1F3551680E2AD9701A4FCFB248FA7FA77B95180628BB2"
[03:50:50] [DEBUGcache_get_field_content_int row0field_name"ID"connection1
[03:50:50] [DEBUGCMySQLResult::GetRowDataByName row'0'field"ID"data"1"
[03:50:50] [DEBUGCMySQLResult::~CMySQLResult() - deconstructor called
[03:50:50] [DEBUGCMySQLConnection::Connect establishing connection to database...
[
03:50:50] [DEBUGCMySQLConnection::Connect connection was successful
[03:50:50] [DEBUGCMySQLConnection::Connect auto-reconnect has been enabled
[03:50:52] [DEBUGmysql_format connection1len100format"SELECT * FROM `users` WHERE `Name` = '%e' LIMIT 1"
[03:50:52] [DEBUGmysql_tquery connection1query"SELECT * FROM `users` WHERE `Name` = 'damar' LIMIT 1"callback"OnAccountLoad"format"i"
[03:50:52] [DEBUGCMySQLQuery::Execute[OnAccountLoad] - starting query execution
[03:50:52] [DEBUGCMySQLQuery::Execute[OnAccountLoad] - query was successfully executed within 0.402 milliseconds
[03:50:52] [DEBUGCMySQLResult::CMySQLResult() - constructor called
[03:50:52] [DEBUGCalling callback "OnAccountLoad"..
[
03:50:52] [DEBUGcache_get_field_content_int row0field_name"pAdminLevel"connection1
[03:50:52] [DEBUGCMySQLResult::GetRowDataByName row'0'field"pAdminLevel"data"0"
[03:50:52] [DEBUGcache_get_field_content_int row0field_name"Premium"connection1
[03:50:52] [DEBUGCMySQLResult::GetRowDataByName row'0'field"Premium"data"0"
[03:50:52] [DEBUGcache_get_field_content_int row0field_name"pEXP"connection1
[03:50:52] [DEBUGCMySQLResult::GetRowDataByName row'0'field"pEXP"data"0"
[03:50:52] [DEBUGCMySQLResult::~CMySQLResult() - deconstructor called
[03:56:11] [DEBUGmysql_format connection1len128format"UPDATE `database` SET `pEXP` = %d, `Premium` = %d, `pAdminLevel` = %d,"
[03:56:11] [DEBUGmysql_tquery connection1query"UPDATE `database` SET `pEXP` = 1000, `Premium` = 0, `pAdminLevel"callback"(null)"format"(null)"
[03:56:11] [DEBUGCMySQLQuery::Execute[] - starting query execution
[03:56:11] [ERRORCMySQLQuery::Execute[] - (error #1064) 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 '' at line 1
[03:56:11] [DEBUGCMySQLQuery::Execute[] - error will be triggered in OnQueryError
[03:56:43] [DEBUGmysql_connect host"localhost"user"root"database"database"password"****"port3306autoreconnecttruepool_size2
[03:56:43] [DEBUGCMySQLHandle::Create creating new connection..
[
03:56:43] [DEBUGCMySQLHandle::CMySQLHandle constructor called
[03:56:43] [DEBUGCMySQLHandle::Create connection created (id1)
[
03:56:43] [DEBUGCMySQLConnection::Connect establishing connection to database...
[
03:56:43] [DEBUGCMySQLConnection::Connect connection was successful
[03:56:43] [DEBUGCMySQLConnection::Connect auto-reconnect has been enabled
[03:56:43] [DEBUGmysql_errno connection1
[03:56:43] [DEBUGCMySQLConnection::Connect establishing connection to database...
[
03:56:43] [DEBUGCMySQLConnection::Connect establishing connection to database...
[
03:56:43] [DEBUGCMySQLConnection::Connect connection was successful
[03:56:43] [DEBUGCMySQLConnection::Connect connection was successful
[03:56:43] [DEBUGCMySQLConnection::Connect auto-reconnect has been enabled
[03:56:43] [DEBUGCMySQLConnection::Connect auto-reconnect has been enabled
[03:56:43] [DEBUGCMySQLConnection::Connect connection was successful
[03:56:43] [DEBUGCMySQLConnection::Connect auto-reconnect has been enabled
[03:57:09] [DEBUGmysql_format connection1len128format"SELECT `Password`, `ID` FROM `users` WHERE `Name` = '%e' LIMIT 1"
[03:57:09] [DEBUGmysql_tquery connection1query"SELECT `Password`, `ID` FROM `users` WHERE `Name` = 'damar' LIMI"callback"OnAccountCheck"format"i"
[03:57:09] [DEBUGCMySQLQuery::Execute[OnAccountCheck] - starting query execution
[03:57:10] [DEBUGCMySQLQuery::Execute[OnAccountCheck] - query was successfully executed within 51.862 milliseconds
[03:57:10] [DEBUGCMySQLResult::CMySQLResult() - constructor called
[03:57:10] [DEBUGCalling callback "OnAccountCheck"..
[
03:57:10] [DEBUGcache_get_data connection1
[03:57:10] [DEBUGcache_get_field_content row0field_name"Password"connection1max_len129
[03:57:10] [DEBUGCMySQLResult::GetRowDataByName row'0'field"Password"data"FD9D94340DBD72C11B37EBB0D2A19B4D05E00FD78E4E2CE8923B9EA3A54E900DF181CFB112A8A73228D1F3551680E2AD9701A4FCFB248FA7FA77B95180628BB2"
[03:57:10] [DEBUGcache_get_field_content_int row0field_name"ID"connection1
[03:57:10] [DEBUGCMySQLResult::GetRowDataByName row'0'field"ID"data"1"
[03:57:10] [DEBUGCMySQLResult::~CMySQLResult() - deconstructor called
[03:57:14] [DEBUGmysql_format connection1len100format"SELECT * FROM `users` WHERE `Name` = '%e' LIMIT 1"
[03:57:14] [DEBUGmysql_tquery connection1query"SELECT * FROM `users` WHERE `Name` = 'damar' LIMIT 1"callback"OnAccountLoad"format"i"
[03:57:14] [DEBUGCMySQLQuery::Execute[OnAccountLoad] - starting query execution
[03:57:14] [DEBUGCMySQLQuery::Execute[OnAccountLoad] - query was successfully executed within 0.400 milliseconds
[03:57:14] [DEBUGCMySQLResult::CMySQLResult() - constructor called
[03:57:14] [DEBUGCalling callback "OnAccountLoad"..
[
03:57:14] [DEBUGcache_get_field_content_int row0field_name"pAdminLevel"connection1
[03:57:14] [DEBUGCMySQLResult::GetRowDataByName row'0'field"pAdminLevel"data"0"
[03:57:14] [DEBUGcache_get_field_content_int row0field_name"Premium"connection1
[03:57:14] [DEBUGCMySQLResult::GetRowDataByName row'0'field"Premium"data"0"
[03:57:14] [DEBUGcache_get_field_content_int row0field_name"pEXP"connection1
[03:57:14] [DEBUGCMySQLResult::GetRowDataByName row'0'field"pEXP"data"0"
[03:57:14] [DEBUGCMySQLResult::~CMySQLResult() - deconstructor called
[03:57:23] [DEBUGmysql_format connection1len128format"UPDATE `database` SET `pEXP` = %d, `Premium` = %d, `pAdminLevel` = %d,"
[03:57:23] [DEBUGmysql_tquery connection1query"UPDATE `database` SET `pEXP` = 1000, `Premium` = 0, `pAdminLevel"callback"(null)"format"(null)"
[03:57:23] [DEBUGCMySQLQuery::Execute[] - starting query execution
[03:57:23] [ERRORCMySQLQuery::Execute[] - (error #1064) 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 '' at line 1
[03:57:23] [DEBUGCMySQLQuery::Execute[] - error will be triggered in OnQueryError 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)