Speed, simplicity, power - pick two... i'd be willing to hope that using a COM interface via PHP + ADODB (a lib for php) to access mysql would still end up faster than having my poor mirc lock up for some time qith each larger query - yes i'm useing a mirc based scoket script to do it, yes i know a dll exists for it, and no, the dll will not work how i want it to.
Also, considering just how many dodgy com objects exist for accessing mysql (you try a query and -splat- goes yours pc) this is a better solution for that.

Anyway, you love your C of course your going to be a speed lover. *sigh*

As for "Where can I use PHP in mirc" ... mircscripts.org -> COM Objects tutorial (written by, low and behold, me)... read that. Read it again. understand OOP in all of its niceities. Createw a few COM scriplets with javascript/vbscript first.
Find this post again - follow the link to the article, and find the PHP CVS (and the activePHP com bit). Take PHP knowledge, blend with WSH scriptlets knowledge, and hey presto.