[Astpp-commit] SF.net SVN: astpp:[2320] trunk/scripts/astpp-common.pl
Brought to you by:
darrenkw
From: <dar...@us...> - 2010-10-14 02:08:37
|
Revision: 2320 http://astpp.svn.sourceforge.net/astpp/?rev=2320&view=rev Author: darrenkw Date: 2010-10-14 02:08:31 +0000 (Thu, 14 Oct 2010) Log Message: ----------- get_charges sql code was incorrect. It was returning count rather than the list. Modified Paths: -------------- trunk/scripts/astpp-common.pl Modified: trunk/scripts/astpp-common.pl =================================================================== --- trunk/scripts/astpp-common.pl 2010-09-29 03:40:36 UTC (rev 2319) +++ trunk/scripts/astpp-common.pl 2010-10-14 02:08:31 UTC (rev 2320) @@ -5006,7 +5006,7 @@ my ( $tmp,$sql, @chargelist, $record ); if ($params->{startdate} && $params->{enddate}) { $tmp = - "SELECT COUNT(*) FROM cdrs WHERE cardnum = " + "SELECT * FROM cdrs WHERE cardnum = " . $astpp_db->quote($account) . " AND status = 0" . " AND callstart >= DATE(" . $astpp_db->quote($params->{startdate}) . ")" @@ -5014,21 +5014,21 @@ . " ORDER BY callstart"; } elsif ($params->{startdate}) { $tmp = - "SELECT COUNT(*) FROM cdrs WHERE cardnum = " + "SELECT * FROM cdrs WHERE cardnum = " . $astpp_db->quote($account) . " AND status = 0" . " AND callstart >= DATE(" . $astpp_db->quote($params->{startdate}) . ")" . " ORDER BY callstart"; } elsif ($params->{enddate}) { $tmp = - "SELECT COUNT(*) FROM cdrs WHERE cardnum = " + "SELECT * FROM cdrs WHERE cardnum = " . $astpp_db->quote($account) . " AND status = 0" . " AND callstart <= DATE(" . $astpp_db->quote($params->{enddate}) . ")" . " ORDER BY callstart"; } else { $tmp = - "SELECT COUNT(*) FROM cdrs WHERE cardnum = " + "SELECT * FROM cdrs WHERE cardnum = " . $astpp_db->quote($account) . " AND status = 0" . " ORDER BY callstart"; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |