我正在使用ActiveRecord已存在數據庫。 我需要獲得有關ACCOUNT_TYPE一個personan相關的所有帳號=「A」,所以我必須:phpactiverecord:通過條件獲取對象
class Person extends ActiveRecord\Model {
static $has_many = array(
array(
'accounts',
'conditions' => array('account_type = ?' => array('A')),
'class_name' => 'Accounts',
'foreign_key' => 'idpersona'
)
);
但我得到的錯誤No bound parameter for index 3
。我試圖刪除線'conditions' => array('account_type = ?' => array('A'))
和應用程序正常工作。我做錯了什麼?
對不起,但這並不爲我工作。 –