我的模特在这里.....但我需要选择管理员的状态.......但是 我是codeigniter的新手......并且不知道如何选择......我的需求是...... 在条件admin status =上从表中选择admin整个详细信息 有效且id = 1 ...
我的模特是:
公共功能登录($ value){
$query = $this->db->get_where('tbl_admin', $value, 1, 'active'); if ($query->num_rows() > 0) { $row = $query->row_array(); $sess_arr = array( 'admin_user' => $row['fld_admin_username'], 'adm_key' => $row['fld_admin_key'], 'admin_type' => $row['fld_admin_type'], 'admin_id' => $row['fld_admin_id'], 'admin_logged_in' => TRUE ); $this->session->set_userdata($sess_arr); //echo "<pre>";print_r($this->session->all_userdata());exit; } else{ $this->session->set_flashdata('error', 'Invalid username/password'); redirect('adminzone'); } }