删除sql语句怎么构造?
请问我要写个删除语句,我看教程一般是: $this->db->delete('tablename', array('id' => $id)); 如果我包含like怎么写呢?例如原来语句是:$sql = "delete from tablename where id like '%$id%'";怎么转换?还是就是这样写,然后$this->db->query($sql);通过这个语句来执行?那怎么判断返回结果是成功还是失败?
请问我要写个删除语句,我看教程一般是:
$this->db->delete('tablename', array('id' => $id));
如果我包含like怎么写呢?
例如原来语句是:$sql = "delete from tablename where id like '%$id%'";
怎么转换?还是就是这样写,然后
$this->db->query($sql);
通过这个语句来执行?
那怎么判断返回结果是成功还是失败?
没人回答吗?
$this->db->where();
$this->db->like();
不是很多方法的吗 能具体说一下吗? 知道了,
页:
[1]