{
$tables = array('tabl1');
$this->db->where('uid', $id);
$this->db->delete($tables);
return true;
}
function deletetable4($id)
{
$tables = array('tabl2');
$this->db->where('id', $id);
$this->db->delete($tables);
return true;
} function deletetable($id)
{
if($id!=0)
{
$this->db->delete("tabl1",array("uid"=>$id));
return true;
}
}
function deletetable4($id)
{
if($id!=0)
{
$this->db->delete("tabl2",array("id"=>$id));
return true;
}
}
这样也不行老报DELETE FROM Array WHERE uid = 5 根据你的错误,有两种可能,一种是你的 CI 版本太老,delete 不支持array;另一种就是手册有误,delete 本来就不支持 array
不过,我看了一下源码,delete 是支持 array 的,不知道你那里到底出了什么问题。
PS: 还有写 SQL 办不到的事情????? 麻烦楼主把你的system/database/DB_active_rec.php发上来,
我试了几个CI版本,你的代码都没有错误,要么是你自己改过AR要么是你下的版本被人弄过 支持楼上~~~
页:
1
[2]