[Ajuda] Carregar Mysql
#5

INSERT й para inserir algo no banco de dados.

Se vocк quer carregar na variavel um valor contido no banco de dados й dessa maneira:

PHP код:
    new Query[80], Nome[24];
    
GetPlayerName(playeridNome24);
    
mysql_format(StringConexaoQuerysizeof(Query), "SELECT * FROM `Contas` WHERE `Nome`='%s'"Nome);
    
mysql_tquery(StringConexaoQuery"ResultadoConsulta""i"playerid); // troque StringConexao pela sua variavel de conexao

forward ResultadoConsulta(playerid);
public 
ResultadoConsulta(playerid)
{
    if(
cache_get_row_count(StringConexao) == 1// se os dados existirem
    
{
        
APlayerData[playerid][StatsTruckerJobs]   = cache_get_field_content_int(0"StatsTruckerJobs");
    }
    return 
1;

Й apenas um exemplo, mais seria bom vc ler esse tutorial antes de comeзar seus cуdigos: Tutorial
Reply


Messages In This Thread
Carregar Mysql - by LuisFerreira - 26.08.2015, 02:58
Re: Carregar Mysql - by IgorLuiz - 26.08.2015, 03:04
Re: Carregar Mysql - by LuisFerreira - 26.08.2015, 03:06
Re: Carregar Mysql - by IgorLuiz - 26.08.2015, 03:20
Re: Carregar Mysql - by Cleyson - 26.08.2015, 16:15
Re: Carregar Mysql - by Dayvison_ - 26.08.2015, 16:28
Re: Carregar Mysql - by LuisFerreira - 26.08.2015, 18:30

Forum Jump:


Users browsing this thread: 5 Guest(s)