Display Record |
Hi coders,
how to display record where user is equal to session user. i have code below that i don't know exactly the syntax. PHP Code: $this->db->where('users.fname',$this->session->userdata('fname')); code above is not work as what i need. please any help.
Did you check database and session user guides?
there is everything you need.. Best VPS Hosting : Digital Ocean
You do know that ->where() only sets the WHERE statement, and does not execute the query. I think you are looking for ->get_where().
After the query has run, you can display the query ran with $this->db->last_query() which returns the last ran query.
Website: http://tomaz.lovrec.eu
GitHub: https://github.com/slax0rr Twitter: https://twitter.com/slax0rr
Okay.. thanks all you guys,
i got the solution here: PHP Code: $this->db->where('users.fname',$this->session->userdata['logged_in']['fname']); |
Welcome Guest, Not a member yet? Register Sign In |