MySQL issues
#1

It was saving before, but now I'm quiet unsure as to why this is happening.
PHP код:
forward SaveAccountStats(playerid);
public 
SaveAccountStats(playerid)
{
    if(
Logged[playerid] == 1)
    {
        new 
query[1280];
        
mysql_format(mysqlquerysizeof(query), "UPDATE `users` SET `Money`=%d, `Admin`=%d, `Vip`=%d, `Kills`=%d, `Deaths`=%d, `Score`=%d, `Rank`=%d, `Banned`=%d, `Warns`=%d, ",\
        
PlayerInfo[playerid][pMoney], PlayerInfo[playerid][pAdmin], PlayerInfo[playerid][pVip], PlayerInfo[playerid][pKills], PlayerInfo[playerid][pDeaths], PlayerInfo[playerid][pScore], PlayerInfo[playerid][pRank], PlayerInfo[playerid][pBanned],\
        
PlayerInfo[playerid][pWarns]);
        
mysql_format(mysqlquerysizeof(query), "%s`VW`=%d, `Interior`=%d, `Min`=%d, `Hours`=%d, `PM`=%d, `Color`=%d, `Turfs`=%d, `Clan`=%d, ",\
         
queryPlayerInfo[playerid][pVW], PlayerInfo[playerid][pInt], PlayerInfo[playerid][pMin], PlayerInfo[playerid][pHour], PlayerInfo[playerid][pPM], PlayerInfo[playerid][pColor], PlayerInfo[playerid][pTurfs], PlayerInfo[playerid][pClan]);
        
mysql_format(mysqlquerysizeof(query), "%s`ClRank`=%d, `ClLeader`=%d, `Invited`=%d, `Inviting`=%d  WHERE `ID`=%d",\
        
queryPlayerInfo[playerid][pClRank], PlayerInfo[playerid][pClLeader], PlayerInfo[playerid][pInvited], PlayerInfo[playerid][pInviting], PlayerInfo[playerid][pID]);
        
mysql_tquery(mysqlquery"""");
        return 
1;
    }
    return 
0;

MySQL error:
PHP код:
[DEBUGCMySQLQuery::Execute[] - no callback specifiedskipping result saving
Reply
#2

That's a debug message, not an error message. It doesn't indicate abnormal behavior.
Reply
#3

I see, either way it's not saving the players stats because it's skipping the save.
Reply
#4

I've always used it like this in R41, but i don't know which version you are using. Maybe thats why it is looking for callback.

mysql_tquery(mysql, query, "", "");

>

mysql_tquery(mysql, query);
Reply
#5

Quote:
Originally Posted by aoky
Посмотреть сообщение
I see, either way it's not saving the players stats because it's skipping the save.
"Skipping result saving" just means that it doesn't generate a cache (for use with cache_ functions). Have you actually checked the database?
Reply
#6

Quote:
Originally Posted by Vince
Посмотреть сообщение
"Skipping result saving" just means that it doesn't generate a cache (for use with cache_ functions). Have you actually checked the database?
The database is fine, sorry for the late reply but I'm positive this isn't working.
Reply
#7

You should use strcat instead of mysql_format to 'create' your query and at the end, use mysql_format to format your query.
Reply
#8

Formatting the query will make it have that information, the 3rd time you do this, all info before has been gone, that's why it doesn't save.

Do as Dayrion said, or make 3 smaller queries and execute them 1 by 1
Reply
#9

Quote:
Originally Posted by Dayrion
Посмотреть сообщение
You should use strcat instead of mysql_format to 'create' your query and at the end, use mysql_format to format your query.
It worked before, I'm not sure why it won't save the players stats.

PHP код:
no callback specifiedskipping result saving 
Clearly this is an issue, but I don't know why.
Reply
#10

Quote:
Originally Posted by aoky
Посмотреть сообщение
It worked before, I'm not sure why it won't save the players stats.

PHP код:
no callback specifiedskipping result saving 
Clearly this is an issue, but I don't know why.
That is NOT an issue, as you were told before.

Eg: if you do:
Код:
mysql_tquery(mysql, query, "RandomPublic", ""); 
// ...
forward RandomPublic();
public RandomPublic() { }
That debug message will be supressed.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)