SA-MP Forums Archive
MYSQL not loading a string - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: MYSQL not loading a string (/showthread.php?tid=537807)



MYSQL not loading a string - Magic_Time - 17.09.2014

PHP код:
forward OnAccountLoad(playerid);
public 
OnAccountLoad(playerid)
{
    
PlayerInfo[playerid][pAdmin] = cache_get_field_content_int(0"pAdmin");
    
PlayerInfo[playerid][pDonor] = cache_get_field_content_int(0"pDonor");
    
PlayerInfo[playerid][pScore] = cache_get_field_content_int(0"pScore");
    
PlayerInfo[playerid][pCash] = cache_get_field_content_int(0"pCash");
    
PlayerInfo[playerid][pKills] = cache_get_field_content_int(0"pKills");
    
PlayerInfo[playerid][pHelper] = cache_get_field_content_int(0"pHelper");
    
PlayerInfo[playerid][pJailed] = cache_get_field_content_int(0"pJailed");
    
PlayerInfo[playerid][pJailedTime] = cache_get_field_content_int(0"pJailedTime");
    
PlayerInfo[playerid][pCaptures] = cache_get_field_content_int(0"pCaptures");
    
PlayerInfo[playerid][pTime] = cache_get_field_content_int(0"pTime");
    
cache_get_field_content(0"pRegisterDate"PlayerInfo[playerid][pRegisterDate]);
    
cache_get_field_content(0"pLastLogin"PlayerInfo[playerid][pLastLogin]);
    
SetPlayerCash(playeridPlayerInfo[playerid][pCash]);
    
SetPlayerScore(playeridPlayerInfo[playerid][pScore]);
    return 
1;

The problem is that pLastLogin is not being loaded. Do you see anything wrong in my code?

I've checked the table and I have the field pLastLogin


Re: MYSQL not loading a string - MikeEd - 18.09.2014

Is your PlayerInfo[playerid][pLastLogin] a string?


Re: MYSQL not loading a string - rickisme - 18.09.2014

https://sampwiki.blast.hk/wiki/MySQL/R33..._field_content

Quote:

You have to provide the size (max_len) by yourself if you use an enum-array as destination