I have two tables set up for this. One is a list of users with their extensions, departments, and names. The other is the actual phone records that our PBX dumps into MySQL. I need to be able to get a total by each user (both inbound and outbound) as well as a total by department.
here's what I have so far:
Code: Select all
$deptsqlin = "select l.*, e.name from logs l, extensions e where (cast(concat(l.year,'-',l.month,'-',l.date) as DATE) between '".date("Y-m-d", strtotime($y."-".$m."-".$d))."' and '".date("Y-m-d", strtotime($ty."-".$tm."-".$td))."') and l.dest_mail = e.ext and e.department = '".$dept."'";thx,
Burr
feyd | Please use
Code: Select all
andCode: Select all
tags where approriate when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]