MySQL[]
#6

Change from

pawn Код:
format(Query,sizeof(Query),"INSERT INTO `users` (pName,pPass,pAdmin,pCash) VALUES ('%s','%s,'%i','%i')",pName,EscapedText,PInfo[playerid][pAdmin],PInfo[playerid][pMoney]);
To

pawn Код:
format(Query, sizeof(Query), "INSERT INTO `users` (`pName`, `pPass`, `pAdmin`, `pCash`) VALUES ('%s', '%s', %i, %i)", pName, EscapedText, PInfo[playerid][pAdmin], PInfo[playerid][pMoney]);
As Misiur said the query string is too small to fully store the string, this results in an uncomplete query and hence the error.

So change
pawn Код:
new EscapedText[60],Query[80],pName[MAX_PLAYER_NAME];
To

pawn Код:
new EscapedText[60],Query[128],pName[MAX_PLAYER_NAME];
128 is an arbitary number. You might want to change it depending on what you are trying to store. Are your passwords encrypted? If so you probably need a higher number.
Reply


Messages In This Thread
MySQL[] - by xganyx - 08.09.2013, 04:53
Re: MySQL[] - by Eyce - 08.09.2013, 05:00
Re: MySQL[] - by Misiur - 08.09.2013, 08:59
Re: MySQL[] - by xganyx - 08.09.2013, 09:13
Re: MySQL[] - by Dragonsaurus - 08.09.2013, 09:15
Re: MySQL[] - by playbox12 - 08.09.2013, 09:28
Re: MySQL[] - by Konstantinos - 08.09.2013, 09:46
Re: MySQL[] - by xganyx - 08.09.2013, 09:49
Re: MySQL[] - by Dragonsaurus - 08.09.2013, 09:54
Re: MySQL[] - by Misiur - 08.09.2013, 10:10

Forum Jump:


Users browsing this thread: 1 Guest(s)