SA-MP Forums Archive
help! error #1064 while executing query - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: help! error #1064 while executing query (/showthread.php?tid=649431)



help! error #1064 while executing query - parames3010 - 08.02.2018

hello can you help me, i have problem about mysql r41-4

it can't save my data, and when i see the logs i got error #1064.
Quote:

[05:58:00] [ERROR] error #1064 while executing query "UPDATE `players` SET Leve ='2', AdminLevel ='0', DonateRank ='0', ConnectedTime ='0', Registered ='1', Sex ='1', Age ='0', Origin ='1', Muted ='0', Respect ='0', Money ='2000', Bank ='0', Kills ='0', Paycheck ='9', Jailed ='0', JailTime ='0', Leader ='0', Member ='3', Rank ='1', Chara ='23', Inte ='0', Local ='255', Team ='5', Model ='23', PayDay ='0', PayDayHad ='0', Warnings ='0', Adjustable ='1', Banned ='0', Point ='0', Hamnoi ='0', Pytm ='3', Boxev ='0', MaxMana ='0', Yaexp ='0', Kame ='0', Duelwin ='0', Duellose ='0', Duelall ='0', Serpan ='0', Yunluk ='0', Tuksa ='0', Pomod ='0', Godman ='0', Dood ='0', Alin ='0', Hitman ='0', Rayman ='0', Passlub ='0', Ntime ='0', Watergun ='0', Hatshot ='0', MuteTime ='0', Perob ='0', Boxsuit ='0', Suit1 ='0', Suit2 ='0', Suit3 ='0', Suit4 ='0', Suit5 ='0', Suiton1 ='0', Suiton2 ='0', Suiton3 ='0', Suiton4 ='0', Suiton5 ='0', Tutral ='1', Suit6 ='0', Suiton6 ='0', Polnm ='0', Polcs ='0', Dbpoint ='0', Miniadmin ='0', Rockcall ='0', Robber ='0', Pray ='0', Bancop ='0', Cardpol ='0', Carduppol ='0', Hotkey ='0', Hinup ='0', Dgup ='0', Akup ='0', Jobsl ='0', Jobgl ='0', Digtime ='0', Songup ='0', Pointall ='0', Suitup ='0', Suit7 ='0', Suiton7 ='0', Suit8 ='0', Suiton8 ='0', Suitdrh ='0', Suitdrhon ='0', Pidsuit ='0', Suitrace1 ='0', Suitrace2 ='0', Suitrace3 ='0', Suitrace4 ='0', Suitraceon1 ='0', Suitraceon2 ='0', Suitraceon3 ='0', Suitraceon4 ='0', Yaexptime ='0', Yahp ='0', Yahptime ='0', Jomjon ='0', Pointonline ='0', Hamgun1 ='0', Hamgun2 ='0', Hamgun3 ='0', Jutilv ='0', Pointev ='0', Kammiti ='0', Suitrace5 ='0', Suitraceon5 ='0', Winev ='0', Winwar ='0', Rockker ='0', Petnm ='0', Petcs ='0', Petya ='0', Getbb ='0', Boxitem ='0', Itema1 ='0', Itema2 ='0', Itema3 ='0', Itema4 ='0', Itema5 ='0', Itema1on ='0', Itema2on ='0', Itema3on ='0', Itema4on ='0', Itema5on ='0', Suitrace6 ='0', Suitraceon6 ='0', Itema12 ='0', Itema13 ='0', Itema14 ='0', Itema15 ='0', Itema12on ='0', Itema13on ='0', Itema14on ='0', Itema15on ='0', Itema22 ='0', Itema23 ='0', Itema24 ='0', Itema2": 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
i don't know what wrong? please help


Re: help! error #1064 while executing query - Kane - 08.02.2018

You should really split up your queries...

And look for an improper character where the query stopped.


Re: help! error #1064 while executing query - parames3010 - 08.02.2018

Quote:
Originally Posted by Arthur Kane
Посмотреть сообщение
You should really split up your queries...

And look for an improper character where the query stopped.
how?


Re: help! error #1064 while executing query - Kane - 08.02.2018

It stops at Itema25. See if you misplaced a character.

Also, there are simpler ways of updating an array. e.g:

PHP код:
new OurArrayMAX_PLAYERS ][ 10 ];
stock saveMyArrayplayerid ) {
    new 
szArraySaver200 ];
    for( new 
i10i++ ) {
        
mysql_formatur_handleszArraySaversizeof szArraySaver"UPDATE `players` SET `Itema%i` = %i WHERE id = %i"iOurArrayplayerid ][ ], playerid );
        
mysql_tqueryur_handleszArraySaver );
    }
    return 
1;