I need help with mysql functions
#1

hello, i have a_sampmysql.inc with this natives

PHP код:
native samp_mysql_connect(server[], user[], password[]);
native samp_mysql_select_db(db[]);
native samp_mysql_query(query[]);
native samp_mysql_store_result();
native samp_mysql_fetch_row(line[]);
native samp_mysql_get_field(field[], value[]);
native samp_mysql_num_rows();
native samp_mysql_num_fields();
native samp_mysql_ping();
native samp_mysql_real_escape_string(src[], dest[]);
native samp_mysql_free_result();
native samp_mysql_strtok(dest[], separator[], src[]);
native samp_mysql_close(); 
how I can select all users from the table and show them in the sendcliendmessage?

my code

PHP код:
new query[64];
format(querysizeof(query), "SELECT * FROM players WHERE member = 1");
samp_mysql_query(query);
samp_mysql_store_result();
for(new 
ifindmember?; i++)
{
    
format(stringsizeof(string), "Name %s",namefromdb?);
    
SendClientMessage(playeridCOLOR_YELLOWstring);

please help me with this function, thx
Reply


Messages In This Thread
I need help with mysql functions - by brawrr - 24.09.2011, 14:23
Re: I need help with mysql functions - by Hiddos - 24.09.2011, 14:29
Re: I need help with mysql functions - by brawrr - 24.09.2011, 14:38
Re: I need help with mysql functions - by brawrr - 24.09.2011, 14:49

Forum Jump:


Users browsing this thread: 3 Guest(s)