vrana/notorm

query not executing when passing result row to another php function

Closed this issue · 1 comments

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?

Use iterator_to_array($rows).