I have tried something like this
$result = $db->table('input1 AS in1')
->select('*')
->where("started >= ? AND started < ?", $start,
$end)
->where(array("InputID" => 2))
->where(" not exists (select 1 from input2 AS in2
where in2.status = 0 and in2.started > in1.started)")
->where("status != ?", 0);
basically i want to use same table as subselect but then i get error
from mysql that my syntax is wrong
I guess you will kill me, because this is realated to NotORM which is
included in Nette framework (which probably differs and i should ask
in nette formu and not here)
Jan