Answer the question
In order to leave comments, you need to log in
Why is the request not working in kohane orm?
$places = ORM::factory('place');
$places -> find_all();
$places = ORM::factory('place')->find_all();
Answer the question
In order to leave comments, you need to log in
In the first case, probably, the second line should be something like $places = $places->find_all();
, because you need to put the result into some variable.
Let's analyze it in the course: it ORM::factory('place')
returns an ORM object. You put it in a variable $places
. Then you call the method find_all()
, but don't assign the result anywhere.
In the second case, you put the result of the method find_all()
into a variable.
$places = ORM::factory('place');
$places_array = $places -> find_all();
var_dump($places_array);
In the first option, you simply did not assign the result to a variable as in the second.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question