[SQL] Simple plugin.
I really don't understand this SQL connection between cs server and a web server.
Can anyone make a simple plugin with: -when i type in chat /sql to send a message with my name,ip,steamid to the web server? I'll find it easy to learn if i have an example. |
Re: [SQL] Simple plugin.
Here is example: https://forums.alliedmods.net/showth...66#post1204466
This example is using sqlite (it's a file located in addons/amxmodx/data/sqlite3/<dbname>.sq3). To make it work with mysql server you just need to change: PHP Code:
PHP Code:
There are 4 console commands: table_create - creates space in database where data can be stored (needs to be used only once) table_save <number> - saves data (you can have any number of datas assigned to your current steamid) table_load <number> - loads data that was previously saved with <number> table_loadx - loads data of all numbers There are many log_amx in code that will print to server console information about what was sent to sql and what was retrieved, so you can try many things and see what happens. Example: use any command with incorrect server ip or when mysql server is turned off, save/load without creating table, load data with number that was not saved previously etc. |
Re: [SQL] Simple plugin.
Thank you.
|
| All times are GMT -4. The time now is 12:00. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.