help mysql
#1

helppp

error:
Quote:

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 '`rango1' at line 1 - Callback - OnQueryFinish - Query: INSERT INTO `faccion`(`nombre`, `numero`, `rango1

Quote:

stock crearusefacc(playerid)
{
new pName[24], Query[50];
GetPlayerName(playerid, pName, 24);
format(Query, sizeof(Query), "INSERT INTO `faccion`(`nombre`, `numero`, `rango1`) VALUES (%s, %d, %d)", pName, UserInfo[playerid][pFaccion], UserInfo[playerid][rank]);
mysql_function_query(Conecction, Query, true, "OnQueryFinish", "ii", 0, playerid);
return 1;
}

Reply
#2

Strings need ' ' around %s or %e (escaped) specifier.

pawn Код:
"INSERT INTO `faccion`(`nombre`, `numero`, `rango1`) VALUES ('%s', %d, %d)"
Reply
#3

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
Strings need ' ' around %s or %e (escaped) specifier.

pawn Код:
"INSERT INTO `faccion`(`nombre`, `numero`, `rango1`) VALUES ('%s', %d, %d)"
Follow the error
Reply
#4

Also, your query length is too short. The query as it stands right now (without data) is already 72 chars. Your length is 50
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)