database access

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
NashBridges
Forum Members
Forum Members
Posts: 75
Joined: Sun Jun 15, 2008 2:29 pm

database access

Post by NashBridges »

hi
i've searched the forum but haven't found any solution for this topic.

I want to present database content, which is stored in the same db like cmsms (different prefix) and handling the query results by xajax. i know basically how this can be done.
my question is how to use the database connection of the CMSms and how to send querys to the database using this connection, so that i would not have to connect to the db for every access myself. is ther a tutorial anywhere or could anybody help me out and describe the steps to a solution?

thx
regards
christian
Ruben_c
Forum Members
Forum Members
Posts: 35
Joined: Thu Jun 17, 2010 3:12 am

Re: database access

Post by Ruben_c »

maybe with:  $db = $this->getDb();
A simple template that you can do with CMS Made simple.

http://www.octoporos.cl
Peciura

Re: database access

Post by Peciura »

Code: Select all

$db = cmsms()->GetDB();
Here are some links to AdoDB documentation. CMSms is using AdoDB Lite but most things are the same to AdoDB.
http://adodb.sourceforge.net/
http://adodblite.sourceforge.net/datadictionary.php
There is module "Skeleton" it is the reference for module building.

If you will search forum for 'GetDB()' you will find more examples.
Post Reply

Return to “Modules/Add-Ons”