|
Author
|
Message
|
|
Veteran Member
|

05-29-2010
, 18:34
Re: Question about MySql
|
#1
|
Quote:
Originally Posted by Sylwester
Try this:
PHP Code:
public get_money(id){ static cache[256], data[2] new money = 16000 formatex(cache, 255,"SELECT Nick FROM table_name WHERE Money=%d;", money) data[0] = money SQL_ThreadQuery(g_SqlTuple, "handle_get_money_query", cache, data, 1) return PLUGIN_HANDLED }
public handle_get_money_query(FailState,Handle:Query,Error[],Errcode,Data[],DataSize){ static name[32], money if(FailState){ log_amx("SQL Error: %s (%d)", Error, Errcode) return PLUGIN_HANDLED }
money = Data[0] while(SQL_MoreResults(Query)){ SQL_ReadResult(Query,SQL_FieldNameToNum(Query,"Nick"), name, 31) client_print(0, print_chat, "%s has %d money", name, money) SQL_NextRow(Query) } return PLUGIN_CONTINUE }
|
No, sorry, but that's not what I want.
I want to query for PhpMyAdmin and I show it from there, not from a plugin, sorry.
And sorry but I am very bad at English
I do not want the query:
SELECT * FROM money WHERE `date` = '16000'
For the 16000 was an example, I want to show me their recurrence.
__________________
|
|
|
|