mIRC Homepage
Posted By: alBo Storing the variables into a SQL database. - 05/06/05 08:44 PM
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
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
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.
Posted By: BNX Re: Storing the variables into a SQL database. - 27/06/05 01:11 AM
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?
© mIRC Discussion Forums