Raised This Month: $ Target: $400
 0% 

Few questions from idiot


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
LambdaLambda
AlliedModders Donor
Join Date: Oct 2010
Location: London
Old 10-23-2012 , 15:19   Few questions from idiot
Reply With Quote #1

Hey,

i've done my own plugin. The idea is, to work with MySQL database. To insert, select etc. data into/from it. Everything was goig right until i had to seperate the servers somehow. So i choosen the string option. Like, to put as a table name a string, which gets data from cVar.

Ookay, so i've done it.
PHP Code:
Format(testsizeof(test), "INSERT INTO %t(steamid, ingame) VALUES ('%s',1)"tablenameauth); 
It does compile, looks like it gonna work. But when i connect to the server, when the plugin have to send data to mysql, it just doesn't, and i do get errors in errorlogs.
Quote:
[0] Line 98, test.sp::OnClientAuthorized()
Native "SQL_TQuery" reported: Invalid database Handle 0 (error: 4)
Any ideas how to fix it? Or maybe it's impossible what i'm trying to do?

Last edited by LambdaLambda; 10-26-2012 at 14:02.
LambdaLambda 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 11:44.


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