mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Feb 2003
Posts: 309
C
Fjord artisan
OP Offline
Fjord artisan
C
Joined: Feb 2003
Posts: 309
Hey. If your anything like me you like RDMS (SQL databases); but you don't like the thought of making people install mySQL with your mirc script.
As a PHP developer, its been paraded up and down infront of me a lot, and I finally took a look. I'm talking about SQLite.

Its a pretty good little command line application that comes in at a measely 129kb - yet provides about the same functionality as mySQL for smaller databases. This means its perfect for mirc. It gets better too. You can either interact via the command line (dlls in mirc exist for this) or you can get SQLitePlus which includes a COM object, usable right from mirc.

SQLitePlus:
http://www.eztools-software.com/fr.asp?s=tools&l=/Tools/sqliteplus/default.asp

Just thought I'd let you know, as I *hate* using unwieldy hash tables and trying to do some of the whacky things I can do with SQL.

Joined: Jul 2003
Posts: 742
Hoopy frood
Offline
Hoopy frood
Joined: Jul 2003
Posts: 742
mirc scripts dont come with sql that needs to be installed very often.. and mysql is much better than anything wink


http://MTec89Net.com
irc.freenode.net #MTec89Net
Joined: Feb 2003
Posts: 309
C
Fjord artisan
OP Offline
Fjord artisan
C
Joined: Feb 2003
Posts: 309
Of course they don't need SQL very often. SQLite is perfect for small databases whihc are about the only ones you'd ever use with mirc. Its fast, its flexible, and 129kb vs 13mb or so of overhead (damned if i can remember) is very tempting.

There are few COM objects to interact with mysql directly that are stable (the ones I've tried crash too much). Sure you have the mysql.dll avaible on mircscripts, but that requires still having access to a local database; again its a rare day anyone will go through installing mysql if they don't know what use it is, etc etc.

On certain operations SQLite has come out faster than mysql; which makes me kinda go 'phwoar'. You can't expect to run the control centers of NASA with it; but for anything else it would be a neat solution.
Also, if you use DOS BATCH scripting and timers (which is ugly), you can start up an entirely different process; causing mirc to keep on going while the dos proggie runs. Its pretty close to multithreaded, letting you fetch big recordsets and keep on chatting.

This is all pretty much close to the stuff that was stated when they decided to bundle it with PHP5; despite the fact LAMP is everywhere.
It gives you power you can fit on a floppy disk :P


As for nothing beats mySQL; as much as I love it it seems you've not pushed towards the limits of it.
SELECT * FROM table WHERE (id = (SELECT * FROM table2 WHERE id = 'bob'))
I can't remember if that would actually work on a fully compliant RDMS; but mysql can't do it. It really should be able to. I await the day when it does.
Thats just one small example; luckily this sort of thing slips by most people who use it with PHP - you can do all sorts of the higher level stuff in that layer. Anyhow; I love my mysql; but sqlite is by far (imho) the best for packaging with software/scripts.

Joined: Feb 2003
Posts: 309
C
Fjord artisan
OP Offline
Fjord artisan
C
Joined: Feb 2003
Posts: 309
A note: Windows 98/95 users be careful with this COM object (SQLitePlus); I recently stuck it on my pc and had it overwrite MSVCRT.DLL with a version for windows XP. Needless to say; Explorer.exe wouldn't work and windows insisted I reinstall it.
So if you going to use it; make copies of MSVCRT.DLL first. I've emailed the author and (amazingly within a few hours) gotten a reply back that its being corrected.
So long as you understand how to work dos your all good. smile

On the plus side they have no EULA saying they aren't liable for damage; so you COULD lawsuit em smile heh.


Link Copied to Clipboard