0 THEN '0' ELSE '1' END # Man darf den Fall solange sehen, bis er abgeschlossen ist, also entweder mit Status 7 oder 8 ) AND b.imtuid = '$uid' AND b.frist_datum >= date_format(now(), '%Y-%m-%d') AND b.stellung_dat ='0000-00-00 00:00:00' GROUP BY a.vid ORDER BY frist_datum ASC"; $result = $db->query ($query) or die ("Cannot execute query"); $table_data1 = array(); while ($row = $result->fetch_array()){ array_push($table_data1, array( 'vid' => $row[vid], 'betreff' => $row[betreff], 'erfass_dat_form' => $row[erfass_dat_form], 'frist_dat_form' => $row[frist_dat_form] ) ); } $smarty->assign('table_data1', $table_data1); } $smarty->assign('action', "$action"); $smarty->display("$template/$templatename"); ?>