Quote from: theuros at Oct 18, 2010, 07:16 AM
i’m migrating from evo to revo and i use a lot of custom queries like this from my previous post http://modxcms.com/forums/index.php/topic,55489.msg320194.html#msg320194
I’m used to work with $modx->db->query("SELECT...") class from modx evolution, so my question is what is the future of it? i heard that will be removed in some future version of modx revolution? if that’s true, i want to know how i can implement my own class like $mody->db... into modx so i can use it anywhere i want ?
When the DBAPI is removed from Revolution, it will be made available as an Extra. You can load any external class as a "service" class onto the $modx instance, and this is how it will be accomplished. You will just have to add a call to the
$modx->getService() method to register the DBAPI instance and make it available as the $modx->db object.