Latest |Kites |Pictures |Programming |Life
[filed under Programming]Zend Framework DB Insert NOW

Some keywords: SQL Insert Update Zend_Db_Table_Row NOW() now function Zend_Db_Table Zend_Db_Expr

Use the SQL function NOW() in ZF:

$k = new My_Table();
$row = $k->createRow();
$row->datetime        = new Zend_Db_Expr('NOW()');
$row->save();

This works because DB Expr doesn't escape the string 'NOW()'. Yay.

15th of July, 2008@3:29:22 PM
add a comment, permanent link to article

Comments

name
website
Check this if you are a human being. Thanks.

Comment


Parse error: syntax error, unexpected $end in /home/teethgrinduk/public_html/bbclone/var/access.php on line 368