Using Jamie Rumbelow's MY Model

I have a question I'm using Jamie Rumbelow's MY_Model as my model and I'm trying to figure out how I can add a field from a separate table.

Site Pages- id, page_name, page_slug, date_created, author_id, sort_order

I do a get all function run to get all the records of the site pages. It returns the array correctly however when it does it returns the value of the author_id which I need it to get the actual user's name from a user's table.

Users - id, username, first_name, last_name

So the author_id equals the id of the user table and it needs to select the first name and last name. I'm not sure how to pull this off with this MY_Model.

Has anyone else tried doing this before?


I've read it many times but having a hard time understanding what I would need to do with my script.

I found this post and trying to apply the same logic.

And its still not pulling in the data from the users table.

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.