mIRC Home    About    Download    Register    News    Help

Print Thread
Storing the variables into a SQL database. #122062 05/06/05 08:44 PM
Joined: Jun 2005
Posts: 1
A
alBo Offline OP
Mostly harmless
OP Offline
Mostly harmless
A
Joined: Jun 2005
Posts: 1
Ok, Hello everyone,

I have knowledge of SQL but no knowledge of mirc scripting, someone has written a script in mirc scripting and we would like to store the variables into a MySQL database.

This script is a Gather Script that allows Gathers for games. Some variables that are stored in the database are things like topadmins and topplayers.

I am not sure exactly buit this information is stored in remote.ini

Instead of them sotring the variables into the remote.ini is it possible to store and retrieve this information from an MySQL database in the same way that mirc gets it from remote.ini?

All help is much appreciated and i would like to state that i am a complete novice at this so please explain as fully as you can.

Regards
Christian

Re: Storing the variables into a SQL database. #122063 09/06/05 07:37 PM
Joined: Dec 2002
Posts: 1,922
O
Online Offline
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
remote.ini is the file where mIRC keeps variables, alongside other settings. Variables are not a good means of storing massive amount of information, for various reasons. If you're only looking for a better database, have a look at mIRC's hash table functions (/help hash tables).

If, however, it is necessary that the information be kept in an SQL database, you have two options: either find an SQL DLL for mIRC (by seaching scripting sites like http://www.mircscripts.org and http://www.mirc.net) or try your luck with Microsoft's data-access COM objects. Those can be accessed and manipulated (to a degree) with mIRC's COM functions. For more information on the COM option, search these forums for "adodb". Look for posts written by Hammer wink

Re: Storing the variables into a SQL database. #122064 11/06/05 04:53 AM
Joined: Dec 2002
Posts: 103
Pasmal Offline
Vogon poet
Offline
Vogon poet
Joined: Dec 2002
Posts: 103
Ask yourself why you need to store the data from a mIRC bot in a database? Are you driving a wedpage from this database as well?

If you are, then consider integrating your mIRC script with the website (Web Services anyone?). I did it many years back to integrate a mIRC bots user management feature with the user management system on a website.

In case you don't know what mIRC scripting feature to use, it's sockets.

Re: Storing the variables into a SQL database. #122065 27/06/05 01:11 AM
Joined: Jun 2005
Posts: 44
B
BNX Offline
Ameglian cow
Offline
Ameglian cow
B
Joined: Jun 2005
Posts: 44
Just pass the variables through the url when connecting to the site.

like... open a socket to "www.mysite.com/index.php?var=foobar"

In theory, this should work no?