25.02.2012, 23:06
[Plugin] [REL] MySQL Plugin (Now on github!)
26.02.2012, 20:23
Then why even mention you have something better that you don't even wish to share? this my code & concept has been tested and running properly on the server with minimal changes for over 2 years.
27.02.2012, 16:25
I'm struggling to get the login and registering working now. I'll try my best to fix it myself!
29.02.2012, 18:11
Hello. I have Debian 6 installed. When I start the server, following messages show up:
What's wrong? How do I compile the plugin properly?
Quote:
[22:57:12] Error: Function not registered: 'SSCANF_Init' [22:57:12] Error: Function not registered: 'SSCANF_Join' [22:57:12] Error: Function not registered: 'SSCANF_Leave' [22:57:12] Error: Function not registered: 'Streamer_RegisterInterface' [22:57:12] Error: Function not registered: 'Streamer_AddPlayer' [22:57:12] Error: Function not registered: 'Streamer_RemovePlayer' [22:57:12] Error: Function not registered: 'Streamer_VerifyPickup' [22:57:12] Error: Function not registered: 'Streamer_VerifyCheckpoint' [22:57:12] Error: Function not registered: 'mysql_debug' [22:57:12] Error: Function not registered: 'mysql_connect' [22:57:12] Error: Function not registered: 'mysql_ping' [22:57:12] Error: Function not registered: 'mysql_query' [22:57:12] Error: Function not registered: 'mysql_close' [22:57:12] Error: Function not registered: 'mysql_store_result' [22:57:12] Error: Function not registered: 'sscanf' [22:57:12] Error: Function not registered: 'mysql_num_rows' [22:57:12] Error: Function not registered: 'mysql_fetch_row_format' [22:57:12] Error: Function not registered: 'mysql_free_result' [22:57:12] Error: Function not registered: 'mysql_real_escape_string' [22:57:12] Error: Function not registered: 'mysql_insert_id' [22:57:12] Error: Function not registered: 'GetGVarFloat' [22:57:12] Error: Function not registered: 'GetGVarInt' [22:57:12] Error: Function not registered: 'SetGVarInt' [22:57:12] Error: Function not registered: 'SetGVarString' [22:57:12] Error: Function not registered: 'SetGVarFloat' [22:57:12] Error: Function not registered: 'GetGVarString' [22:57:12] Error: Function not registered: 'DeleteGVar' [22:57:12] Error: Function not registered: 'mysql_retrieve_row' [22:57:12] Error: Function not registered: 'CreateDynamic3DTextLabel' [22:57:12] Error: Function not registered: 'UpdateDynamic3DTextLabelText' [22:57:12] Error: Function not registered: 'DestroyDynamic3DTextLabel' [22:57:12] Error: Function not registered: 'CreateDynamicObject' [22:57:12] Error: Function not registered: 'GetDynamicObjectPos' [22:57:12] Error: Function not registered: 'DestroyDynamicObject' [22:57:12] Error: Function not registered: 'IsValidDynamic3DTextLabel' [22:57:12] Error: Function not registered: 'CreateDynamicCP' [22:57:12] Error: Function not registered: 'CreateDynamicMapIcon' |
29.02.2012, 18:14
It looks like MySQL plugin is not the only one that doesn't load. In fact there are at least 4.
So open up your server log file and see if any plugins load at all. Also, see if your server.cfg has a valid plugins line (plugins suffixed with .so) and if the plugin files actually exist in the /plugins/ folder.
So open up your server log file and see if any plugins load at all. Also, see if your server.cfg has a valid plugins line (plugins suffixed with .so) and if the plugin files actually exist in the /plugins/ folder.
29.02.2012, 18:21
I got all the plugin files in the folder, the plugin string in server.cfg is as follows:
I tried different plugin versions, none of it works properly though. It seems it depends on Linux distributive heavily.
So how do I compile it for Debian 6 myself?
Thank you.
Quote:
plugins nativechecker.so mysql.so streamer.so sscanf.so gvar.so |
So how do I compile it for Debian 6 myself?
Thank you.
01.03.2012, 13:07
You need to have some dependencies installed on the machine. I think you can do this using apt-get install on Debian.
Quoting the main post:
Quoting the main post:
Quote:
Linux: Install gcc, gpp & mysql-client and type "make" in the source files folder. |
01.03.2012, 14:03
Where's "mysql.so" file?
I have got a Windows XP but i want lauch your mysql plugins on linux server.
I have got a Windows XP but i want lauch your mysql plugins on linux server.
01.03.2012, 18:58
How to check is server connected to the database?
Even if I enter wrong user/pass, mysql_ping() will work because it's connected to the MySQL server.
Even if I enter wrong user/pass, mysql_ping() will work because it's connected to the MySQL server.
01.03.2012, 19:22
If you enter wrong DB, debug will write this:
If you try to execute a query after failed connection, it will write "Dead connection".
So, you can use mysql_ping() because it isn't connected to a MySQL server.
It works for wrong username/pass AND wrong DB.
Код:
[21:20:43] >> mysql_connect(localhost, root, wrong_db, ******) on port 3306 [21:20:43] CMySQLHandler::CMySQLHandler() - constructor called. [21:20:43] CMySQLHandler::CMySQLHandler() - Connecting to "localhost" | DB: "wrong_db" | Username: "root" [21:20:43] CMySQLHandler::Connect() - Unknown database 'wrong_db' (Error ID: 1049) [21:20:43] >> mysql_ping( Connection handle: 1 )
So, you can use mysql_ping() because it isn't connected to a MySQL server.
pawn Код:
if(mysql_ping() == -1) print("Connection failed");
02.03.2012, 14:49
The download link for R7 version doesn't work. Can you reupload the R7 version?
03.03.2012, 11:03
Here's something that I wrote yesterday to circumvent this problem. Requires you to have the cache enabled for that particular select query!
Not yet tested, so use at your own risk!
pawn Код:
stock mysql_fetch_int(connectionHandle)
{
new
rows,
fields,
storage[12];
cache_get_data(rows, fields, connectionHandle);
if(!rows)
return cellmin;
cache_get_row(0, 0, storage, connectionHandle);
return strval(storage);
}
stock Float:mysql_fetch_float(connectionHandle)
{
new
rows,
fields,
storage[12];
cache_get_data(rows, fields, connectionHandle);
if(!rows)
return Float:cellmin;
cache_get_row(0, 0, storage, connectionHandle);
return floatstr(storage);
}
03.03.2012, 14:25
Why is mysql_function_query the only function where you need to put in the connectionHandle?
Why not just the same as the other functions, that you can choose if you want to use a connectionHandle?
Why not just the same as the other functions, that you can choose if you want to use a connectionHandle?
03.03.2012, 14:35
Because we have a possibility to use custom function and custom parameters (format), so script can't make sense between parameters and connection handle. That's the reason why is connection handle on first place.
03.03.2012, 14:40
03.03.2012, 14:49
03.03.2012, 14:59
Hello guys. I just have a question: what is a threaded and a non-threaded script?
03.03.2012, 15:01
03.03.2012, 16:45
Quote:
I just don't understand this
pawn Код:
|
mysql_store_result();
mysql_fetch_row(name); // Fetch the row into the string, which is "name". This currently same as fetch_int(), but this fetch the row into the string and not return with int.
https://sampwiki.blast.hk/wiki/MySQL#mysql_fetch_row_format
03.03.2012, 17:10
thanks for reply, my friend told me that before
Now I have to fix problem with sscanf and than I'll test code you gave me!
Now I have to fix problem with sscanf and than I'll test code you gave me!
« Next Oldest | Next Newest »
Users browsing this thread: 1 Guest(s)