#include ", "", "") or die("Unable to connect to SQL server"); pg_exec ($dbh, "SET DateStyle = 'ISO'") or die("Datenbank-Abfrage!"); if (isset($_GET['month'])) $month = $_GET['month']; else $month = date('Y-m'); ?> %s > '; $table_foot = '
Datum Dauer Verwendungszweck
'; $table_row = '%s%s%s'; $query = "SELECT oid,start,customer,time,task FROM stempel WHERE time IS NOT NULL "; if (isset($month) && $month !== 'all') $query .= "AND start LIKE '".$month."-%' "; $query .= "ORDER BY customer,start"; $sth = pg_exec ($dbh, $query); $customer = ''; while ($row = pg_fetch_array ($sth)) { if ($customer != $row['customer']) { if (strlen($customer)) echo($table_foot); printf($table_head, $row['customer']); $customer = $row['customer']; $color = ""; } $d = explode(' ', $row['start']); $color = $color==""?"":""; printf($table_row, $color, $d[0], min2hour($row['time']), $row['oid'], $row['task']); } ?>
# Local variables: # mode: text # mode: auto-fill # end: