コントローラ:
function verifyuser()
{
$uri = $this->uri->uri_to_assoc(4);
//print_r($uri);
if( isset( $uri['id'] ) && $uri['id'] != '' )
{
$where = array();
$where['roll_number'] = $uri['id'];
$this->data['verification'] = $this->admin_model->verify($where);
}
else
{
$this->data['verification'] = array();
}
$this->data['content'] = 'admin/verification';
$this->view($this->data);
}
モデル:
function verify($where='')
{
$this->db->select('*');
$this->db->from( $this->db->dbprefix('members') );
if( !(empty( $where )) )
$this->db->where( $where );
$result = $this->db->get();
//echo $this->db->last_query();
return $result->result();
}
www.example.com/user/admin/verify/ 345
から
www.example.com/user/admin/verify/ hgf_877%%%_oi
このような。