28.01.2010, 03:56
Very simple:
Usage: LookForNum(number) (LookForNum(1245))
pawn Код:
stock LookForNum(num)
{
MySQLCheck();
new
query[65];
format(query, sizeof(query), "SELECT * FROM `table` WHERE Number='%d'", num);
mysql_query(query);
mysql_store_result();
if(mysql_num_rows() > 0)
{
mysql_free_result();
return 1;
}
else
{
mysql_free_result();
return 0;
}
/*
change:
table for the table where the numbers are
Number='s' for the field where the numbers are (just change the word "Number")
*/
}