我得到这个错误:当我试图执行这个查询学说对更新查询失败
500 | Internal Server Error | Doctrine_Connection_Mysql_Exception SQLSTATE[42S22]: Column not found: 1054 Unknown column 'domain_name' in 'where clause'
:
public function updateDomain($domain_name, $expiration_date, $authcode)
{
$q = Doctrine_Query::create()
->update('domain d')
->set('d.domain_name', '?', $domain_name)
->set('d.expiration_date', '?', $expiration_date)
->set('d.authcode', '?', $authcode)
->where('d.domain_name = ?', $domain_name)
->execute();
}
这里是我的数据库的示意图:
id | client_id | registar_id | domain_name | expiration_date | authcode ....
主键是id
。
client_id
和registar_id
是外键。
更多,当我执行我的数据库通过主义产生的查询,它工作正常...
可能相关:http://stackoverflow.com/questions/3262223/doctrine-column-not-found-1054-unknown-column-s-features-in-field-list(希望一些答案可能会对你有所帮助) –
没有答案帮我... – DOZ
跑步'php symfony doctrine:build --all-classes' – j0k