PHP-Code:
$sql= "SELECT
W.info, SEC_TO_TIME(W.duration) as fduration, W.duration as duration, W.wid,
T.name as tname, T.tid,
P.name as pname, DATE_FORMAT('P.start','%m%y') as fstart,
C.name as cname,
E.name as ename
FROM
".PREFIX."worksheet W
LEFT JOIN ".PREFIX."employee E
ON E.eid = W.eid
LEFT JOIN ".PREFIX."projekt P
ON P.pid = W.pid
LEFT JOIN ".PREFIX."client C
ON C.cid = P.cid
LEFT JOIN ".PREFIX."type T
ON T.tid = W.tid
WHERE
YEAR( W.date ) = ".$this->intyear." AND
MONTH( W.date ) = ".$this->intmonth." AND
DAYOFMONTH( W.date ) = ".$this->intday."
AND W.eid = '".$this->userid."'";
//echo $sql;
$result = $objDB->query($sql);
if(DB::isError($result)) {
die($result->getMessage());
}
$summe ="";
$this->worksheetdata = array();
while($row = $result->fetchrow(DB_FETCHMODE_ASSOC)) {
$this->worksheetdata[] = $row;
}
Code:
<tr class="{$class}"> <td valign="top"><p>{$worksheetdata[i].fstart}_{$worksheetdata[i].pname|truncate:20}</p></td> <td valign="top"><p>{$worksheetdata[i].tname}</p></td> <td valign="top"><p>{$worksheetdata[i].fduration|date_format:"%H:%M"}</p></td> <td valign="top"><p>{$worksheetdata[i].info}</p></td> <td align="center" valign="top"><p><a href="{$smarty.server.php_self}?sek=job&day={$smarty.get.day}&month={$smarty.get.month}&year={$smarty.get.year}&userid={$smarty.get.userid}&wid={$worksheetdata[i].wid}">edit</a></p></td> </tr>
in der DB liegt das datum so : 2003-10-03 14:05:00
was mach ich falsch ?
Kommentar