From aa343fc3b845713cf58d43d5c348b83c532a1659 Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Thu, 14 Apr 2005 15:23:11 +0000 Subject: [PATCH] Mise aux normes SQL --- htdocs/compta/stats/cumul.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/compta/stats/cumul.php b/htdocs/compta/stats/cumul.php index 0d3bba646f4..593bab6c560 100644 --- a/htdocs/compta/stats/cumul.php +++ b/htdocs/compta/stats/cumul.php @@ -91,10 +91,10 @@ function pt ($db, $sql, $date) $bc[0]="class=\"pair\""; $bc[1]="class=\"impair\""; - $result = $db->query($sql); - if ($result) + $resql = $db->query($sql); + if ($resql) { - $num = $db->num_rows(); + $num = $db->num_rows($resql); $i = 0; $total = 0 ; print ''; print ""; @@ -105,7 +105,7 @@ function pt ($db, $sql, $date) $var=True; while ($i < $num) { - $obj = $db->fetch_object($result); + $obj = $db->fetch_object($resql); $var=!$var; $total = $total + $obj->amount; print ""; @@ -118,7 +118,7 @@ function pt ($db, $sql, $date) print "\n"; print "
Cumul : ".price($total)."
\n"; - $db->free(); + $db->free($resql); } }