I
I
Ivan Ivanov2018-04-04 11:39:27
Kohana
Ivan Ivanov, 2018-04-04 11:39:27

How to make such sql query using kohana ORM?

Request: Thank you.
Select * from humans where YEAR(bdate) = 1987;

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
bkosun, 2018-04-26
@romalu

More or less like this:

$humans = ORM::factory('Human')
    	->where(DB::expr('YEAR(`bdate`)'), '=', '1987')->find_all();

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question