Nette\Database equivalent to dibi's fetchAssoc

Notice: This thread is very old.
OndrejSlamecka
Member | 41
+
0
-

Hello,

I've got a simple timetable – a set of events. Every event has set its hour and day. Now I am trying to print them out in a table: With dibi I used to use fetchAssoc(‘day,hour’) (or similar) to get array like this:

<?php
array(
  '1' /* day */ => array(
     '1' /* hour */ => array( array(...) /* event */, array(...) /* event */ ),
     '2' /* hour */ => array( array(...) /* event */ )
   )
);
?>

I want to get the same array structure with Nette\Database, but it doesn't have fetchAssoc() method. Is it possible to get array (or traverse database entries) like this or do I have to write my own solution? Or should I try to solve this problem in a completly different way?

Thank you

Last edited by OndrejSlamecka (2011-09-04 14:30)

OndrejSlamecka
Member | 41
+
0
-

The answer is here: http://groups.google.com/…91240fc8df62
Sorry for not writing it earlier.