mysql synthax error
#1

hi this code causes error :

PHP код:
CMD:hcreate(playeridparams[])
{
    new 
hname[50], priceFloat:epos[3], Float:ipos[3], interior;
    if(
sscanf(params"s[50]ia<f>[3]i"hnamepriceiposinterior)) return SendClientMessage(playeridCOLOR_ERROR"Usage /hcreate [hname][price][iposx][iposy][iposz][interrior]");
    
GetPlayerPos(playeridepos[0], epos[1], epos[2]);
    new 
query[256],text3d[128];
    
format(querysizeof(query), "INSERT INTO housedata (HouseName, Price, EnterPosX, EnterPosY, EnterPosZ, InteriorPosX, InteriorPosY, InteriorPosZ, Interior, VirtualWorld) VALUES ( '%s', '%d', '%f', '%f', '%f', '%f', '%f', '%f', '%d', '%d')"hnamepriceepos[0], epos[1], epos[2], ipos[0], ipos[1], ipos[2], interiorgVWCount[0]);
    
mysql_query(query);
    
format(text3dsizeof(text3d), "Prix : %d");
    
CreateDynamicPickup(12731epos[0], epos[1], epos[2]);
    
CreateDynamic3DTextLabel(text3dCOLOR_GREENepos[0], epos[1], epos[2]+0.620);
    return 
1;

Код:
errorid: 1064 | error: 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 '' at line 1 | resultid: -1 | extraid: -1 | callback: NULL | query: INSERT INTO housedata (HouseName, Price, EnterPosX, EnterPosY, EnterPosZ, InteriorPosX, InteriorPosY, InteriorPosZ, Interior, VirtualWorld) VALUES ( 'test', '20000', '2846.013427', '1278.831542', '23.455440', '123.123001', '123.311996', '1321.123046'
[20:05:00]
Reply
#2

its ok size of query was to small for query
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)