[thelist] PHP / smarty

David Miller david at deadpansincerity.com
Sun Oct 9 12:05:40 CDT 2011

> The question. How can you convert the smarty ID to a PHP variable that can
> be used in the PHP/MySQL query?

Something like:

$prod = $this->getTemplateVars('product');
$prod_id = $prod->id


Don't do this :)

Instead rip out the pointless and redundant Php Template Engine.

If you can't do that, then unless it's deeply insane, the smarty object is
getting instantiated and passed existing PHP variables.

Do your database logic there & pass in whatever objects you get back.

Love regards etc

David Miller
07854 880 883

More information about the thelist mailing list