When querying the database from something like a UDT, the standard code for a basic query isn't working.
Is there a special code I need? I searched the docs.
Thanks.
Querying the Database?
Querying the Database?
Last edited by CWebguy on Sun Mar 22, 2009 5:46 am, edited 1 time in total.
CMSMS Made
Re: Querying the Database?
Sorry, when looking at the error messages, it may be that I just have to open a new connection. I'll try that now.
But I'm guessing there is a class I can use?
Thanks.
But I'm guessing there is a class I can use?
Thanks.
Last edited by CWebguy on Sun Mar 22, 2009 3:16 pm, edited 1 time in total.
CMSMS Made
Re: Querying the Database?
Why not look some examples already done?CWebguy wrote: But I'm guessing there is a class I can use?
Search in wiki for share your UDT
Alby
Re: Querying the Database?
what something like:
?
Thanks.
Code: Select all
global $gCms;
$hm =& $gCms->GetHierarchyManager();
$db = &$gCms->db;
Thanks.
CMSMS Made
Re: Querying the Database?
cool, so I'm guessing
global $gCms;
$db = &$gCms->db;
creates a connection to the database then?
Thanks.
global $gCms;
$db = &$gCms->db;
creates a connection to the database then?
Thanks.
CMSMS Made
Re: Querying the Database?
better: you use same connection of CMSMSCWebguy wrote: creates a connection to the database then?
Alby