[Ayuda] Asignar valores a variables del gm (MySQL)
#7

Podes hacerlo asi
pawn Код:
stock CheckUser(playername[])
{
    mysql_real_escape_string(playername,playername);
   
    new query[strlen(playername)+30];
    format(query,sizeof(query),"SELECT ColumnaNombre FROM Tabla WHERE ColumnaNombre = '%s' LIMIT 1",playername);
    mysql_query(query);

    mysql_store_result();
    if(mysql_num_rows())
    {
        mysql_free_result();
        return 1;
    }
    mysql_free_result();
    return 0;
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)