因此,当我运行活动记录查询时,我遇到了一个奇怪的错误(或者我可能只是愚蠢)。看看这个:
$results = $this->db->
select('cd.casino_name, cd.casino_opened, cd.casino_latitude, cd.casino_longitude')->
from('casino_data as cd, casino_cities as cc')->
where('cd.city_id',$city_id)->
where('cd.city_id=cc.city_id')->
get()->result_array();
然后我明白了:
Error Number: 1054
Unknown column 'cd.city_id=cc.city_id' in 'where clause'
SELECT `cd`.`casino_name`, `cd`.`casino_opened`, `cd`.`casino_latitude`, `cd`.`casino_longitude`
FROM (`m_casino_data` as cd, `m_casino_cities` as cc)
WHERE `cd`.`city_id` = 1
AND `cd`.`city_id=cc`.`city_id`
Filename: httpdocs/_dev/libraries/Test.php
Line Number: 649
发生了什...
帮助请...谢谢