List Info

Thread: Re: function call within function call




Re: function call within function call
user name
2007-02-12 04:03:06
{checkfield data=$supplier value=$supplier_value
  default=$actype|get_supplier}

did the trick. Great!

An additional question related to the modifier:

In the php-script I have a MDB2-database connection $mdb2.
In modifier function I want to retrieve data from that
particular database.
Is there a way of relating to that global variable $mdb2 or
would I have to assign it to smarty or even
open a new database connection?

in modifier.get_supplier.php:

function smarty_modifier_get_supplier($params)
{	
$req = 'SELECT DISTINCT Delivery FROM Lieferant WHERE AC =
'. $params . 
' ORDER BY Delivery ASC';
$supplier = & $mdb2->queryCol($req);
if(PEAR::isError($supplier)) {
	die ($supplier->getMessage());
	}
else {
	return $supplier;
	}
}

Peggy

-- 
Smarty General Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub
.php


[1]

about | contact  Other archives ( Real Estate discussion Medical topics )