Posts: 233
Threads: 82
Joined: Jan 2011
I have done this mysql_format which is meant to log kicks into the database
pawn Код:
mysql_format(sqlConnection, query, sizeof(query), "INSERT INTO kicklogs (`Name`, `Admin`, `Reason`) VALUES ('%e', '%e', '%e')", NameRP(id), NameRP(playerid), msg);
What else would I need to do in order for this to work? I don't entirely understand pquery, just want this to log into the db
Posts: 547
Threads: 57
Joined: Dec 2010
You don't need to use mysql_pquery for this, you can just use mysql_tquery in this case
Код:
mysql_tquery(sqlConnection, query);
and it'll work fine.
Posts: 233
Threads: 82
Joined: Jan 2011
Quote:
Originally Posted by DTV
You don't need to use mysql_pquery for this, you can just use mysql_tquery in this case
Код:
mysql_tquery(sqlConnection, query);
and it'll work fine.
|
../gamemodes/Includes/Commands/General.pwn(250) : error 035: argument type mismatch (argument 3)
Код:
mysql_tquery(sqlConnection, query, sizeof(query), "INSERT INTO kicklogs (`Name`, `Admin`, `Reason`) VALUES ('%e', '%e', '%e')", NameRP(id), NameRP(playerid), msg);
edit: looked up samp wiki for the function but still confused
Posts: 233
Threads: 82
Joined: Jan 2011
Quote:
Originally Posted by Battlezone
Use tquery for UPDATE operations and pquery for SELECT operations.
Pquery would work here but tquery would be better in this case
|
Ah I got it.