【发布时间】:2016-09-27 12:27:04
【问题描述】:
我正在尝试找到一种方法来验证我的删除查询是否成功。如何从以下结构中获取 num_rows 或affected_rows:
public function fire_db($currentUserID, $id_staff){
$this->db->where('id_player', $currentUserID);
$this->db->where('id_hired_staff', $id_staff);
$this->db->limit(1);
$this->db->delete('game_hired_staff');
if ($this->db->num_rows() == 1) {
return true;
}
else
return false;
}
使用 codeigniter 3
【问题讨论】:
标签: php mysql codeigniter