⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

like() not working



hurtz

hurtz
  • profile picture
  • Member

Posted 24 January 2017 - 06:36 AM

I'm trying to fetch a data from my session and pass this as the value of a variable using this:

 

          $division = $this->session->userdata('divID');

 

now i wanted to show only the records that contains the divID using the like ()

         

          $crud->like('action_officer', $division);

 

After login, I checked my session table and Im getting the correct value for my divID. So far Im not getting any error. But when i checked the displayed records, nothing is there. Please help, what am I missing here?

 

 

 

 

       

 

 

 


hurtz

hurtz
  • profile picture
  • Member

Posted 27 January 2017 - 03:46 AM

looks like this line of my code is not returning any value

  

     $this->session->userdata('divID');

 

I've checked a lot of posts here and the above code is what I've seen, can anyone please guide me? please bear with my ignorance, I don't have any background in programming or whatever you call it and I just started learning this stuff 2 weeks ago. thanks in advance


hurtz

hurtz
  • profile picture
  • Member

Posted 03 February 2017 - 01:43 AM

i managed to retrieve my data from the session using the code below:

   

instead of

 

    $division = $this->session->userdata('divID');

 

I used this

 

     $division = $this->session->userdata['logged_in']['divID'];

 

Thanks for the views