mysql_query return value.
#3

pawn Код:
format(query, sizeof(query), "SELECT `GangName` FROM `Gangs` WHERE `GangName`='%s'", gangname);
mysql_query(query);
mysql_store_result();
if(mysql_num_rows()!=0)
{
//do something,when the row exists
}else
{
//do something,when the row don't exists
}
mysql_free_result();
https://sampwiki.blast.hk/wiki/MySQL#mysql_query
mysql_query return 1 on success, 0 on fail.
Reply


Messages In This Thread
mysql_query return value. - by _Outbreak_ - 14.06.2011, 20:55
Re: mysql_query return value. - by _Outbreak_ - 15.06.2011, 07:09
Re: mysql_query return value. - by Farsek - 15.06.2011, 08:20
Re: mysql_query return value. - by _Outbreak_ - 15.06.2011, 09:09

Forum Jump:


Users browsing this thread: 2 Guest(s)