|
发表于 2013-6-28 17:09:53
|
显示全部楼层
本帖最后由 niudongwei 于 2013-6-28 17:11 编辑
看实际情况而定。。。复杂的查询就直接写SQL;
简单的插入,更新,用CI的方式更方便
比如:
$sql = "update users set email = ?, `name` = ?, phone = ? where uid = ?";
$query = $this->db->query($sql, array($email, $name, $phone, $uid));
return $this->db->affected_rows() > 0;
|
|