简体   繁体   中英

Zend query for “select a table and insert into another with where clause”?

此查询正在MySql Workbench上运行,现在在Zend中需要此查询。

INSERT new_table SELECT * from old_table WHERE date(created_time) < 2015-04-05;

All you need to do is just use the query method of your adapter.

// $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');

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM