Page 1 of 1

How to use the database in a userdefinded tag ?

Posted: Thu Jul 19, 2007 1:36 pm
by mp17
Hi
I want to use the database inĀ  a userdefined tag, for example something like that:
$db->Execute("");

The compiler says, that $db ist not an object. So, I have to do sth like that:

global $db ...

But that doesnt work, does somebody know hox to solve that problem ?

mfg, mp17 :)

Re: How to use the database in a userdefinded tag ?

Posted: Thu Jul 19, 2007 2:36 pm
by calguy1000
try:

Code: Select all

global $gCms;
$db =& $gCms->GetDb();