Not updating
#4

First of all Update does not really need to public or forward on your scenario you can just make that into a function,

Second of all why would you use pSQLID, on the adminx and pName on MoneyX? that's a little bit of confusing for both you and the readers.

Third of all
PHP код:
mysql_tquery(something heresomething here""""); 
<- if you are not using the last two parts don't add the quotes, it just makes the process read the empty quotes and empty quotes would give out a value of 0 rather than letting the query think that it's a default -1.

Hope that helps
PHP код:
enum pInfo
{
    
pSQLIDpName[MAX_PLAYERS], pPasswordpAgepAdminpHelperpMoney
};
new 
PlayerInfo[MAX_PLAYERS][pInfo];

public 
Update(playeridtype)
{
    if(
IsPlayerConnected(playerid))
    {
        new 
query1[255];
        {
            switch(
type)
            {
                case 
pAdminx:
                {
                    
mysql_format(g_Sqlquery1sizeof(query1), "UPDATE `users` SET `Admin` = '%d' WHERE `ID` = '%d'"PlayerInfo[playerid][pAdmin], PlayerInfo[playerid][pSQLID]);
                    
mysql_tquery(g_Sqlquery1"""");
                }
                case 
pMoneyx:
                {
                    
mysql_format(g_Sqlquery1sizeof(query1), "UPDATE `users` SET `Money` = '%d' WHERE `Name` = '%s'"PlayerInfo[playerid][pMoney], PlayerInfo[playerid][pName]);
                    
mysql_tquery(g_Sqlquery1"""");
                }
            }
        }
    }
    return 
1;

If it doesn't then, I have no more help to add..
Reply


Messages In This Thread
Not updating - by StR_MaRy - 17.08.2017, 00:31
Re: Not updating - by 10MIN - 17.08.2017, 13:22
Re: Not updating - by StR_MaRy - 17.08.2017, 13:41
Re: Not updating - by JesterlJoker - 17.08.2017, 14:05
Re: Not updating - by StR_MaRy - 17.08.2017, 14:39

Forum Jump:


Users browsing this thread: 1 Guest(s)