[Ajuda] Insert MySQL
#9

Vlw a todos pela ajuda mais jб consegui..

se alguйm quiser:

PHP код:
new aka[124], StringSalvar[124], StringJuntar[124];
    
    
format(Querysizeof(Query),"SELECT * FROM `aka` WHERE Ip = '%s'"GetIP(playerid));
    
mysql_query(MySQLQuery);
    
mysql_store_result();
    
    if(
mysql_num_rows() > 0) {
        
mysql_fetch_field_row(StringSalvar"Names");
        if(
strfind(StringSalvarGetName(playerid), true) != -1) {
        }
        else {
            
format(StringJuntarsizeof(StringJuntar), "%s,"GetName(playerid));
            
strcat(StringJuntarStringSalvar);
            
format(akasizeof(aka), "UPDATE `aka` SET Names = '%s' WHERE Ip = '%s'"StringJuntarGetIP(playerid));
            
mysql_query(MySQLaka);
        }
    }
    else {
        
format(akasizeof(aka), "INSERT INTO `aka` (Ip,Names) VALUES ('%s','%s')"GetIP(playerid), GetName(playerid));
        
mysql_query(MySQLaka);
    } 
Reply


Messages In This Thread
Insert MySQL - by s4kuL - 13.01.2016, 23:23
Re: Insert MySQL - by Coringa_Vilao - 13.01.2016, 23:26
Re: Insert MySQL - by s4kuL - 13.01.2016, 23:27
Re: Insert MySQL - by Coringa_Vilao - 13.01.2016, 23:31
Re: Insert MySQL - by s4kuL - 13.01.2016, 23:37
Re: Insert MySQL - by n0minal - 13.01.2016, 23:42
Re: Insert MySQL - by Coringa_Vilao - 13.01.2016, 23:45
Re: Insert MySQL - by Dayvison_ - 14.01.2016, 00:34
Re: Insert MySQL - by s4kuL - 14.01.2016, 04:15

Forum Jump:


Users browsing this thread: 1 Guest(s)