[MySql Help] To retrieve a value from a MySQL database
#2

Little example

Code:
format(sql, sizeof(sql), "SELECT model FROM cars that WHERE id=%d", carid);
samp_mysql_query(sql);
samp_mysql_store_result();
if (samp_mysql_num_rows() == 0)
{
     SendClientMessage(playerid, COLOR_GRAD1, " Cant find ");
     return 1;
}
samp_mysql_fetch_row(row);
new model = strval(row);
Reply


Messages In This Thread
[MySql Help] To retrieve a value from a MySQL database - by XePloiT - 13.11.2010, 18:39
Re: [MySql Help] To retrieve a value from a MySQL database - by Rider13 - 25.11.2010, 13:30

Forum Jump:


Users browsing this thread: 1 Guest(s)