[HELP] Loop for phone
#4

Very simple:

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")
*/

}
Usage: LookForNum(number) (LookForNum(1245))
Reply


Messages In This Thread
[HELP] Loop for phone - by Zafire2008 - 27.01.2010, 23:13
Re: [HELP] Loop for phone - by Backwardsman97 - 28.01.2010, 01:38
Re: [HELP] Loop for phone - by Zafire2008 - 28.01.2010, 01:43
Re: [HELP] Loop for phone - by Miguel - 28.01.2010, 03:56

Forum Jump:


Users browsing this thread: 3 Guest(s)