خرید بک لینک

Vote count: 0

i just want to do this if(status==0) then only where condition is run and print only related to status==0 record. And when status==1 or then it bypass the where clause and print both data for status==0 and 1. I don't know how to build a query for this. Please help me in this.

my model code

 function listing()  
 {  
 $admin_id = $this->session->userdata('admin_id');

 $query = $this->db->select('student_info.*,admin.status')
         ->from('student_info')
         ->where('student_info.admin_id',$admin_id)
         ->join('admin','admin.admin_id = student_info.admin_id')
         ->get();
 retu $query->result();

 }

this code work properly and print separate data whose status 0 or 1.

i want when admin login with admin_id one and his status 1 then print all data but not for other user.

asked 1 min ago

برچسب: نویسنده: استخدام کار تاريخ: جمعه 20 فروردين 1395 ساعت: 18:57

صفحه بندی