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(test, sizeof(test), "INSERT INTO %t(steamid, ingame) VALUES ('%s',1)", tablename, auth);
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?