query not executing when passing result row to another php function
Closed this issue · 1 comments
bystac commented
Hi,
I'm using the latest master,
consider the following:
$rows = $nORM->any_table()->where('field',5);
print json_encode($rows);
this will not work, as the query is not executed,
I need to loop all the elements and build the array then pass it to php function.
even if I force execution with count($rows), json_encode, still can't read the results and returns an empty results.
is there any solution for this?
vrana commented
Use iterator_to_array($rows)
.