How To Query Another Model Within A View

Hi there,

I’d like to know how to get data from another model in a view.php file.

For example, I’m creating a view to show a record, one of the fields in the record model is a pk of another database table. How do I access data from that other table related to the pk?

Hope that makes sense!

Thanks in advance.

Read about relations in ActiveRecord.

Thanks that helped a lot and I got it working.