Я пытаюсь получить все города страны, но codeigniter генерировать неправильный sql, Почему? Вот моя модельCodeigniter Где генерировать неверный запрос
private $cities = "cities";
public function get_cities_by_country($country_id){
$this->db->select('id, city');
$this->db->where('country_id', $country_id);
$this->db->from($this->cities);
return $this->db->get()->result_array();
}
И я использую log_message за $ country_id и $ this-> db-> last_query()
INFO - 2017-01-16 18:30:25 --> '7'
INFO - 2017-01-16 18:30:25 --> 'SELECT `id`, `city`
FROM (`cities`)
WHERE `country_id` = \'7\'
AND `status` = 1'
Я думаю, что это probliem country_id
= \ '7 \ ' Спасибо!
Спасибо, работает. – norbi