Is there something like dibi::fetchSingle() in nette database?
I've got some struggle with it right now.
What I tried is
<?php $res= $this->db->table('settings')->fetch(); $something = $res->school_year; dump($something); ?>
but when I dump it, it returns activeRow
<?php Nette\Database\Table\ActiveRow #0e64 table private => Nette\Database\Table\Selection #f397 data private => array (1) id => 4 dataRefreshed private => FALSE isModified private => FALSE ?>
but it should return 1 (or some id of school_year)
(btw, there is only one row in settings table, no primary key)
Last edited by Ja (2014-04-30 17:07)