Raised This Month: $ Target: $400
 0% 

Problems with SQLx Query...


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Rixorster
Senior Member
Join Date: Jul 2005
Old 01-10-2007 , 14:00   Problems with SQLx Query...
Reply With Quote #1

Well, meh function is like this:
Code:
public sqlx_test(id) {     new authid[32]     get_user_authid(id,authid,31)     new Handle:Query = SQL_PrepareQuery(g_SqlConnection,"SELECT job FROM accounts WHERE steamid='%s'",authid);     SQL_Execute(Query)     if(!SQL_Execute(Query))     {         // if there were any problems         SQL_QueryError(Query,g_Error,511)         set_fail_state(g_Error)     }     StoreOther = SQL_ReadResult(Query, 0)     client_print(id,print_chat,"[SQLx Test] Found data : %d ",StoreOther)     SQL_FreeHandle(Query) }
It says something like(Not sure but): [MySQL] No result from this query.
What's wrong with it?
Oh, and meh plugin_init is:
Code:
public plugin_init() {     // Registering     register_plugin("Items 2.0", "0.1b", "Rixorster")     // Console Commands     register_concmd("item_aidkit","item_aidkit")     register_concmd("item_emergencykit","item_emergencykit")     register_concmd("item_tazer","item_tazer")     register_concmd("item_lockpick","item_lockpick")     register_concmd("sqlx_test","sqlx_test")     // Client Commands     register_clcmd("say /trigger","Handle_Use")     register_clcmd("say /jail","Handle_Jail")     // Cvars     register_cvar("hrp_sql_host","127.0.0.1")     register_cvar("hrp_sql_user","root")     register_cvar("hrp_sql_pass","lollero")     register_cvar("hrp_sql_db","economy")     // SQLx     new host[64], user[64], pass[64], db[64], error[255];     get_cvar_string( "hrp_sql_host", host, 63 );     get_cvar_string( "hrp_sql_user", user, 63 );     get_cvar_string( "hrp_sql_pass", pass, 63 );     get_cvar_string( "hrp_sql_db", db, 63 );         g_SqlTuple = SQL_MakeDbTuple(host,user,pass,db);     new errorcode     g_SqlConnection=SQL_Connect(g_SqlTuple,errorcode,error,254);     if (!g_SqlConnection)     {         console_print(0,"[HRPi] Server cannot connect to database.")         console_print(0,"[HRPi] Error(%d): %s",errorcode,error)         return     }     console_print(0,"[HRPi] SQLx Connection Succesfull!") }
__________________
You never know, what will happen the day after tomorrow...

+karma if i helped you!
Rixorster is offline
 



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 22:20.


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