Show records based on UserID
- Single Page
Posted 16 April 2012 - 16:01 PM
I've spent some time learning Codeigniter and got a hold of Ion Auth for user authentication. In my particular project I have two MySQL tables, one for users and one for events.
What I'd like to have happen is when a particular user successfully signs in, the events that this user created will be displayed with grocery crud.
What method(s) in grocery crud will help me accomplish this?
Posted 16 April 2012 - 16:05 PM
Posted 17 April 2012 - 01:46 AM
$user = this->ion_auth->user()->row();
$crud->where('userId", $user->id);
Posted 17 April 2012 - 04:37 AM
remerber the firts parameter int where function of grocery is the name of field in the table, the second is the value.