MySQL Threaded R7 - Small Help.
#1

Hi, I'm trying to make it give me the result / date without the need of calling a function as I have many of these queries and making functions for similar queries would be hassle and lots of them too:

What is wrong with my code as data returns NULL:

[07:24:59] ProcessQueryThread(NoThreadResult) - Query was successful. (SELECT Date < UNIX_TIMESTAMP() FROM bans WHERE IP = '81.237.***.**')
[07:24:59] ProcessQueryThread(NoThreadResult) - Data caching enabled.
[07:24:59] CMySQLHandler::StoreResult() - Result was stored.
[07:24:59] CMySQLHandler::FreeResult() - Result was successfully free'd.

pawn Код:
mysql_format(MySQLConnection, MySQL, "SELECT Date < UNIX_TIMESTAMP() FROM bans WHERE IP = '%s'", plrIP);
mysql_function_query(MySQLConnection, MySQL, true, "NoThreadResult", "i", INVALID_PLAYER_ID);

new rows, fields, data[12];
cache_get_data(rows, fields);
if(rows)
{
    cache_get_row(0, 0, data);
    new expire = strval(data);
    printf("data = %s", data);
    printf("expire = %d", expire);
}
Thank you.
Reply


Messages In This Thread
MySQL Threaded R7 - Small Help. - by Kyle - 11.06.2012, 06:21
AW: MySQL Threaded R7 - Small Help. - by Extremo - 11.06.2012, 06:50
Re: MySQL Threaded R7 - Small Help. - by Kyle - 11.06.2012, 10:24
Re: MySQL Threaded R7 - Small Help. - by Vince - 11.06.2012, 10:27
Re: MySQL Threaded R7 - Small Help. - by Kar - 11.06.2012, 10:31
AW: Re: MySQL Threaded R7 - Small Help. - by Extremo - 11.06.2012, 11:22
Re: MySQL Threaded R7 - Small Help. - by Kyle - 11.06.2012, 11:35
AW: Re: MySQL Threaded R7 - Small Help. - by Extremo - 11.06.2012, 11:40
Re: AW: Re: MySQL Threaded R7 - Small Help. - by Kyle - 11.06.2012, 11:43

Forum Jump:


Users browsing this thread: 1 Guest(s)