ORM::factory('pages_version')
->select(array(DB::expr('MAX(version_id)'), 'max_version'))
->where('page_id', '=', '3')
->find_all()
How to make this query with ORM::factory
-
31-05-2022 - |
Question
I dont know how to use this "MAX" with ORM. Use Kohana 3.2.
SELECT MAX( version_id ) AS latest FROM pages_versions WHERE page_id = 3
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow