我有更新行的问题,db中的日期格式是:Y-m-d H:i:s
$date ='2013-08-09';// from POST
Doctrine_Query::create()
->update( 'column z2ud' )
->set( array( 'z2ud.column' => 'value' ) )//
->where( 'z2ud.column = ?', 'value' )
->andWhere( 'DATE_FORMAT(date, "%Y-%m-%d" ) = ?', $date)
->execute();
SQL返回:Unknown aggregate alias: "%Y-%m-%d"
答案 0 :(得分:1)
已解决:您必须使用\'%Y-%m-%d \'不 - > “%Y-%间 - %d”