MySQL Problem.
#10

Quote:
Originally Posted by GaB1TzZzu
Посмотреть сообщение
pawn Код:
if(strcmp(cmd, "/search", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            new query[120];
            new Number;
            tmp = strtok(cmdtext, idx);
            Number= strval(tmp);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /search [number]");
                return 1;
            }
            format(query, sizeof(query)," SELECT * FROM players WHERE Number=%d",Number);
            samp_mysql_query(query);
        }
        return 1;
    }
After.. ?
You sent the query, store the result, check if there are rows matching your query using mysql_num_rows and fetch the result with mysql_fetch_row_format.
Reply


Messages In This Thread
MySQL Problem. - by GaB1TzZzu - 29.03.2011, 10:33
Re: MySQL Problem. - by GaB1TzZzu - 30.03.2011, 08:36
Re: MySQL Problem. - by Calgon - 30.03.2011, 08:39
Re: MySQL Problem. - by GaB1TzZzu - 30.03.2011, 08:44
Re: MySQL Problem. - by Calgon - 30.03.2011, 09:06
Re: MySQL Problem. - by Hornet600 - 30.03.2011, 11:21
Re: MySQL Problem. - by GaB1TzZzu - 30.03.2011, 13:13
Re: MySQL Problem. - by GaB1TzZzu - 30.03.2011, 14:00
Re: MySQL Problem. - by Sergei - 30.03.2011, 14:04
Re: MySQL Problem. - by [NoV]LaZ - 01.04.2011, 11:42

Forum Jump:


Users browsing this thread: 2 Guest(s)