【发布时间】:2011-08-10 20:27:00
【问题描述】:
我制作了一个脚本,可以从一个数据库中导入内容并将其放入另一个数据库;问题是它与消息中断:
PDOException:在 hcap_import_do() 中(/mnt/hgfs/docroot/hcapdrupal/site_drupal/public_html/sites/all/modules/custom/hcap/hcap.module 的第 215 行)。
代码如下:
db_insert('hcap_candidates')->fields(array(
'id' => $e['old_id'],
'pic' => $e['logo'],
'placed' => $e['placed'],
'title' => $e['title'],
'name' => $e['name'],
'interim' => $e['interim'],
'permanent' => $e['permanent'],
'birth' => $e['birth'],
'marital_status' => $e['marital'],
'adress' => $e['address'],
'city' => $e['city'],
'postal' => $e['postal'],
'phone_home' => $e['phone_home'],
'phone_work' => $e['phone_work'],
'phone_mobile' => $e['phone_mobile'],
'email1' => $e['email1'],
'email2' => $e['email2'],
'reg_by' => $e['reg_by'],
'cand_head' => $e['cand_head'],
'cand_body' => $e['cand_body'],
'prominent' => $e['prominent'],
'broadcast' => $e['broadcast'],
'cv' => $e['cv'],
'old_id' => $e['old_id']
))->execute(); // This is line 215.
有没有人知道什么是错的?
【问题讨论】: