Raised This Month: $ Target: $400
 0% 

Question about MySql


Post New Thread Closed Thread   
 
Thread Tools Display Modes
Author Message
Kiske
Veteran Member
Join Date: May 2009
Old 05-29-2010 , 18:34   Re: Question about MySql
#1

Quote:
Originally Posted by Sylwester View Post
Try this:
PHP Code:
public get_money(id){
    static 
cache[256], data[2]
    new 
money 16000
    formatex
(cache255,"SELECT Nick FROM table_name WHERE Money=%d;"money)
    
data[0] = money
    SQL_ThreadQuery
(g_SqlTuple"handle_get_money_query"cachedata1)
    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)"ErrorErrcode)
        return 
PLUGIN_HANDLED
    
}

    
money Data[0]
    while(
SQL_MoreResults(Query)){
        
SQL_ReadResult(Query,SQL_FieldNameToNum(Query,"Nick"), name31)
        
client_print(0print_chat"%s has %d money"namemoney)
        
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.
__________________

Kiske is offline
Send a message via Skype™ to Kiske
Closed Thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:28.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode