MySQL Errors
#1

Any advice on fixing these mysql errors?
https://pastebin.com/WkcDctxW
Reply
#2

Logs say everything you need to know, read them carefully. Like:
Код:
[07:41:49] WARNING [SQLError]: errorid: 1064, error: 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 '`lastCarID` = 0, `maxcarslots` = 3, `Mapper`= 0,`customTag`= '',`customRank`= ''' at line 1
Reply
#3

Quote:
Originally Posted by Dayrion
Посмотреть сообщение
Logs say everything you need to know, read them carefully. Like:
Код:
[07:41:49] WARNING [SQLError]: errorid: 1064, error: 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 '`lastCarID` = 0, `maxcarslots` = 3, `Mapper`= 0,`customTag`= '',`customRank`= ''' at line 1
I still don't get it. What's the issue about the syntax on these fields and what's a possible way to fix them?
Reply
#4

Код:
`customRank`= '''
You're using one too many apostrophes in your query, could you post the query that's performing the save?
Reply
#5

Quote:
Originally Posted by Chyakka
Посмотреть сообщение
Код:
`customRank`= '''
You're using one too many apostrophes in your query, could you post the query that's performing the save?
Код:
mysql_format(sqlGameConnection, query, sizeof(query), "%s `lastCarID` = %d, `maxcarslots` = %d, `Mapper`= %d,`customTag`= '%e',`customRank`= '%e',`LastLogin`= '%e',`PropDate`= '%e',`isinHosp`= %d,`HasMap`= %d,`JailNumber`= %d,`NewCarLic`= %d,`NewBoatLic`= %d,`NewGunLic`= %d,`SueUnix`= %d,",
		query, PlayerInfo[playerid][lastCarID], PlayerInfo[playerid][pMaxCarSlots], PlayerInfo[playerid][pMapper], CustomTag[playerid], customRank[playerid], PlayerInfo[playerid][pLastLogin], PlayerInfo[playerid][pPropExp], pInHospital[playerid], PlayerInfo[playerid][pMap], PlayerInfo[playerid][pJailnumber], PlayerInfo[playerid][pCarLicense], PlayerInfo[playerid][pBoatLicense], PlayerInfo[playerid][pWeaponLicense], PlayerInfo[playerid][pSueUnix]);
I believe this is it
Reply
#6



Where's the action to be performed? I can see a string called query but it makes no sense. I believe you want to put an UPDATE query. Check its usage if you don't know how to use it.
Reply
#7

Quote:
Originally Posted by TheToretto
Посмотреть сообщение


Where's the action to be performed? I can see a string called query but it makes no sense. I believe you want to put an UPDATE query. Check its usage if you don't know how to use it.
it's a long one and the beginning is far behind from the ones that have errors.
I believe it's UPDATE `players` SET .... for all of them
https://i.imgur.com/gQ9wJGg.png
Reply
#8

Add the missing comma before `lastCarID`
Reply
#9

here is my example:

Код:
"UPDATE `Players` SET `Admin` = '%d', `Money` = '%d', `Kills` = '%d', ... and so on, and so on, WHERE `ID` = '%d' "

``

''
,
;
Reply
#10

Quote:
Originally Posted by Mobtiesgangsa
Посмотреть сообщение
here is my example:

Код:
"UPDATE `Players` SET `Admin` = '%d', `Money` = '%d', `Kills` = '%d', ... and so on, and so on, WHERE `ID` = '%d' "

``

''
,
;
so all of them must be `Money`= '%d'?
I see all of them are done without the ' ' on %d but only on %e and they don't have a problem, my wonder is why it makes a problem here.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)