[eluser]Dam1an[/eluser]
Due to the load order you don't have the DB libraries loaded when you need them, so you can either create a db object yourself, but this will mean you have 2 db connections per call (unless you unset one?)
Or, you can 'hack' the core and change the load order although I don't advise that as it will probably break something else