mysql - skips result saving
#1

mysql log
Код:
[20:27:25] [DEBUG] CMySQLResult::~CMySQLResult() - deconstructor called
[20:27:36] [DEBUG] mysql_format - connection: 1, len: 128, format: "UPDATE igraci SET `admin`=%d, `donator`=%d, `dp`=%d, `lang`=%d WHERE `id`=%d"
[20:27:36] [DEBUG] mysql_tquery - connection: 1, query: "UPDATE igraci SET `admin`=0, `donator`=0, `dp`=0, `lang`=1 WHERE", callback: "(null)", format: "(null)"
[20:27:36] [DEBUG] CMySQLQuery::Execute[] - starting query execution
[20:27:36] [DEBUG] CMySQLQuery::Execute[] - query was successfully executed within 22.88 milliseconds
[20:27:36] [DEBUG] CMySQLQuery::Execute[] - no callback specified, skipping result saving
server log
Код:
[20:49:54] UPDATE `igraci` SET `admin`=0, `donator`=0, `dp`=0, `lang`=0 WHERE `id`=0
- the strange thing is the id, its 3 in the phpmyadmin, but its 0 when query gets executed, I think that's the problem, but I can't seem to fix it.

The SAVEACC callback - gets called in OnPlayerDisconnect - for now
pawn Код:
mysql_format(mysql, query, sizeof(query), "UPDATE `igraci` SET \
`admin`=%d, \
`donator`=%d, \
`dp`=%d, \
`lang`=%d \
WHERE `id`=%d"
,\
PLI[playerid][Admin],
PLI[playerid][Donator],
PLI[playerid][DP],
PLI[playerid][Lang],
PLI[playerid][id]);
mysql_tquery(mysql, query, "", "");
OnPlayerDisconnect
pawn Код:
SAVEACC(playerid);
I ******d the problem, but I didn't find a fix for my problem - even tried other sites, not just within samp forums.
Reply
#2

sorry, never mind.

I forgot to get the id from the database...

if anyone else has this kind of problem just use cache_get_field_content to get the id from the database (if your caching)
Reply
#3

Its actually cache_get_field_content_int(); for getting ID's since you'd store them in INT/TINY INT form.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)