这个查询是在MySql Workbench上运行的,现在我需要它在Zend。
INSERT new_table SELECT * from old_table WHERE date(created_time) < 2015-04-05;
您需要做的就是使用适配器的query
方法。
// $db is your DB adapter, e.g. an instance of Zend_Db_Adapter_Mysqli
$db->query('INSERT new_table SELECT * from old_table WHERE date(created_time) < 2015-04-05');