Sql problem
#4

Quote:
Originally Posted by BigBrainAFK
Посмотреть сообщение
there is a problem with the mysql_real_escape_string function in the Login() function of your script
Do you mean this ?

PHP код:
forward Login(playerid);
public 
Login(playerid)
{
    
// Display the main menu
    
ShowMainMenuGUI(playerid);
    
ClearChatbox(playerid);
    
SetPlayerVirtualWorld(playerid0);
    
SetPlayerCameraPos(playerid2022.083740, -1308.26062080.478797);
    
SetPlayerCameraLookAt(playerid1970.506103, -1201.44714325.596593);
    new
        
szQuery[128],
        
szPlayerName[MAX_PLAYER_NAME],
        
szPlayerName2[MAX_PLAYER_NAME];
        
    
GetPlayerName(playeridszPlayerNamesizeof(szPlayerName));
    
    
mysql_real_escape_string(szPlayerNameszPlayerName2g_MySQLConnections[0]);
    
    
// Check MySQL to see if any accounts exist with the specified username on login.
    
format(szQuerysizeof(szQuery), "SELECT COUNT(*) FROM players WHERE Username = '%s'"szPlayerName);
    
mysql_query(szQueryTHREAD_CONFIRM_USERNAMEplayeridg_MySQLConnections[0]);
    
    
ConnectionLog(playeridPlayerInfo[playerid][pID], szPlayerName);
    return 
1;

Reply


Messages In This Thread
Sql problem - by IndependentGaming - 19.07.2015, 14:34
AW: Sql problem - by BigBrainAFK - 19.07.2015, 14:41
Re: Sql problem - by IndependentGaming - 19.07.2015, 14:44
Re: AW: Sql problem - by IndependentGaming - 19.07.2015, 14:53
Re: Sql problem - by IndependentGaming - 19.07.2015, 15:11
Re: Sql problem - by IndependentGaming - 19.07.2015, 15:41
Re: Sql problem - by SilentSoul - 19.07.2015, 15:41
Re: Sql problem - by IndependentGaming - 19.07.2015, 15:45
Re: Sql problem - by SilentSoul - 19.07.2015, 15:58

Forum Jump:


Users browsing this thread: 1 Guest(s)