MYSQL ERROR (error #1064)
#1

PHP код:
 mysql_format(mysqlmquerysizeof(mquery), "UPDATE `players` SET PlayerposX='%f', PlayerposY='%f', PlayerposZ='%f', Int=%d, Vw=%d, Health='%f', Armour='%f' WHERE ID=%d",
    
pInfo[playerid][pX], pInfo[playerid][pY], pInfo[playerid][pZ], pInfo[playerid][pInt], pInfo[playerid][pVw],  pInfo[playerid][pHealth],  pInfo[playerid][pArmour], pInfo[playerid][Sqlid]);
    
mysql_query(mysqlmquery); 
Код:
[17:05:47] [DEBUG] mysql_format - connection: 1, len: 1024, format: "UPDATE `oyuncular` SET PlayerposX='%f', PlayerposY='%f', PlayerposZ='%f', Int=%d, Vw=%d, Health='%f', Armour='%f' WHERE ID=%d"
[17:05:47] [DEBUG] mysql_query - connection: 1, query: "UPDATE `oyuncular` SET PlayerposX='148.484', PlayerposY='-89.149", use_cache: true
[17:05:47] [DEBUG] CMySQLQuery::Execute - starting query execution
[17:05:47] [ERROR] CMySQLQuery::Execute - (error #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 'Int=0, Vw=0, Health='99.0', Armour='99.0' WHERE ID=1' at line 1
Reply
#2

UP ..
Reply
#3

Код:
 mysql_format(mysql, mquery, sizeof(mquery), "UPDATE `players` SET PlayerposX='%f', PlayerposY='%f', PlayerposZ='%f', Int='%d', Vw='%d', Health='%f', Armour='%f' WHERE ID='%d'",
pInfo[playerid][pX], pInfo[playerid][pY], pInfo[playerid][pZ], pInfo[playerid][pInt], pInfo[playerid][pVw],  pInfo[playerid][pHealth],  pInfo[playerid][pArmour], pInfo[playerid][Sqlid]); 
    mysql_query(mysql, mquery);
try this
Reply
#4

PHP код:
 mysql_format(mysqlmquerysizeof(mquery), "UPDATE `players` SET `PlayerposX` = '%f', `PlayerposY` = '%f', `PlayerposZ` = '%f', `Int` = '%d', `Vw` = '%d', `Health` = '%.1f', `Armour` = '%.1f' WHERE ID=%d"
    
pInfo[playerid][pX], pInfo[playerid][pY], pInfo[playerid][pZ], pInfo[playerid][pInt], pInfo[playerid][pVw],  pInfo[playerid][pHealth],  pInfo[playerid][pArmour], pInfo[playerid][Sqlid]); 
    
mysql_query(mysqlmquery); 
Thanks, i solved the problem to use this code.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)