Basically what I'm trying to do is display date records in a table through php where logid = avayaLeg , i.e.,
07/12/2013 | 121321 | 5646546 | 4546516516 |
07/13/2013 | 121321 | 3213151 | 5165165161 | ..... etc
This is my code at the moment and it only gives me one record... Please help
echo ' <table class=de cellpadding="7"><tr><th class=de2>Date</th><th class=de2>ACD Calls</th><th class=de2>Average Talk Time</th><th class=de2>Average ACW Time</th><th class=de2>ACD Time</th><th class=de2>ACW Time</th><th class=de2>Hold Time</th><th class=de2>AUX Time</th><th class=de2>Available</th><th class=de2>Staff Time</th><th class=de2>Average Hold Time</th></tr>'; $sql3 = "select ROW_DATE as rowdate, sum(ACDCALLS) as acdcalls, sum(ACDTIME) as acdtime, sum(ACWTIME) as acwtime, sum(TI_OTHERTIME) as holdtime, sum(TI_AUXTIME) as auxtime, sum(TI_AVAILTIME) as availtime, sum(TI_STAFFTIME) as stafftime, sum(HOLDCALLS) as holdcalls FROM dagent where row_date >= '$cmsYesterdayStart' and row_date <= '$cmsYesterdayEnd' and LOGID = $avayaLeg group by row_date"; $result3 = odbc_exec($dbc2, $sql3); $rowdate = odbc_result($result3, "rowdate"); $acdcalls = odbc_result($result3, "acdcalls"); $holdcalls = odbc_result($result3, "holdcalls"); $acdtime = odbc_result($result3,"acdtime"); $acwtime = odbc_result($result3,"acwtime"); $holdtime = odbc_result($result3,"holdtime"); $auxtime = odbc_result($result3,"auxtime"); $availtime = odbc_result($result3,"availtime"); $stafftime = odbc_result($result3,"stafftime"); $avgtt1 = @($acdtime / $acdcalls); $avgacw1 = @($acwtime / $acdcalls); $avgholdtime1 = @($holdtime / $holdcalls); $avgtt = date('i:s',$avgtt1); $avgacw = date('i:s',$avgacw1); $avgholdtime = date('i:s',$avgholdtime1); $acdtime = date('i:s',$acdtime); $acwtime = date('H:i:s',$acwtime); $auxtime = date('H:i:s',$auxtime); $holdtime = date('i:s',$holdtime); $availtime = date('H:i:s',$availtime); $stafftime = date('H:i:s',$stafftime); echo '<tr><td class=de2>'.$rowdate.'</td><td class=de2>'.$acdcalls.'</td><td class=de2>'.$avgtt.'</td><td class=de2>'.$avgacw.'</td><td class=de2>'.$acdtime.'</td><td class=de2>'.$acwtime.'</td><td class=de2>'.$holdtime.'</td><td class=de2>'.$auxtime.'</td><td class=de2>'.$availtime.'</td><td class=de2>'.$stafftime.'</td><td class=de2>'.$avgholdtime.'</td></tr>'; echo '</table>';