Raised This Month: $ Target: $400
 0% 

Ability to pass MySQL Results?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
harbu
Senior Member
Join Date: Aug 2004
Location: Finland
Old 09-12-2005 , 08:23   Ability to pass MySQL Results?
Reply With Quote #1

Ok, so I am trying to send a result handle from another plugin to another by a native.

Base:
Code:
// MySQL Query ( Use hrp_select for selecting data from MySQL ) public h_query( query[], Result:result) {     param_convert( 1 );     param_convert( 2 );     result = dbi_query( g_db, query )         new ret;     if( result == RESULT_FAILED ) ret = -1;     if( result == RESULT_NONE )ret = 0;     if( result == RESULT_OK) ret = 1;         return ret; }

Include file:
Code:
native hrp_query( query[], Result:result )

Plugin using the native:
Code:
format( g_query, 255, "SELECT wallet, bank FROM accounts WHERE steamid='%s'", authid );         if( hrp_query( g_query, g_result) == 1 )     {         g_wallet[id] = dbi_result( g_result, "wallet" );         g_bank[id] = dbi_result( g_result, "bank" );                 dbi_free_result( g_result );                 return PLUGIN_CONTINUE     }

I haven't got it to work.
So, is it possible to pass Result handles or not? If it is, what have I done wrong?

Thanks, for your time.
__________________
harbu is offline
Send a message via MSN to harbu
 



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 14:19.


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