Hello again ;o)
how would one relate to an existing database connection
(PEAR::MDB2)
within a plugin or modifier function?
The database connection is included as 'standard_db.inc.php'
in
'standard.php' which finally displays the template
containing the plugin.
Is there a way of directly relating to the global variable
$mdb2 within
a modifier-function or would I have
- to fetch 'standard_db.inc.php',
- define $mdb2 as constant (using $smarty.const),
- use config file,
- assign it to smarty or even
- open a new database connection?
in modifier.get_supplier.php:
function smarty_modifier_get_supplier($params)
{
...
$supplier = & $mdb2->queryCol($req);
...
}
Thanks in advance,
Peggy
--
Smarty General Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub
.php
|