Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
get first of has_many
my model has_many files (Like articles has many images)
and many other relation(Category, User, Tag, ....)
i want to show first file of has many in list
how can i do that?
Run the query the other way around, like "show the first image that has "this" article as it's parent". Child records of an object are always fetched as a complete set, even if you only want to display one of them.
Add a Comment
It looks like you're new here. If you want to get involved, click one of these buttons!
Apply for Membership
↳ Job Board
↳ Installation & Setup
↳ Tips and Tutorials
↳ Code share
In this Discussion