我在 Codeigniter 中有一些代码,如下所示:
$this->db->select('email_account_id');
$this->db->where('TRIM(LOWER(email_account_incoming_username))',trim(strtolower($email_address)));
$query = $this->db->get($this->users_db.'email_account');
引发此错误:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') AND TRIM(LOWER(email_account_incoming_username)) = 'email@server.co.uk'' at line 3
SELECT `email_account_incoming_username`, `email_account_id` FROM (`crmuat_users`.`email_account`) WHERE `email_account_id` IN () AND TRIM(LOWER(email_account_incoming_username)) = 'email@server.co.uk'
现在我一辈子都不明白“IN()”是怎么进来的?
有人能看吗?