数据库操作问题
if(is_numeric($condition)){
$where['id']=$condition;
}
$where=$condition;
$this->db->where($where);
return$this->db->delete($table);
为什么执行的sql语句是
Error Number: 1054
Unknown column '3' in 'where clause'
DELETE FROM `message_admin` WHERE `3` IS NULL
Filename: D:\wamp\www\CodeIgniter_2.0.1\CodeIgniter_2.0.1\system\database\DB_driver.php
Line Number: 330
求解 删除方法一行代码
$this->db->delete($table,array('id'=>$id));
页:
[1]