【发布时间】:2013-12-08 04:21:26
【问题描述】:
我想在使用 codeigniter 的 mysql 查询中使用替换功能,但卡住了它不工作
function getmakeid($make_name)
{
$content_query = $this->db->query("select Make_ID from make where LOWER(REPLACE(Make_name, ' ', '')) = ".$make_name);
$content_query = $this->db->get();
if($content_query->num_rows() > 0)
{
return $content_query->result();
}else{
return false;
}
}
返回错误
错误号:1054
“where 子句”中的未知列“A3Cabriolet”
select
model_id
from model
where LOWER(REPLACE(model_name, ' ', '')) = A3Cabriolet
文件名:C:\wamp\www\system\database\DB_driver.php 行号:330"
【问题讨论】:
标签: php mysql codeigniter function replace