diff --git a/htdocs/product/liste.php b/htdocs/product/liste.php index cee01ab2930..8890406f81e 100644 --- a/htdocs/product/liste.php +++ b/htdocs/product/liste.php @@ -117,13 +117,13 @@ $result = $db->query($sql) ; if ($result) { - $num = $db->num_rows(); + $num = $db->num_rows($result); $i = 0; if ($num == 1 && (isset($_POST["sall"]) or $snom or $sref)) { - $objp = $db->fetch_object($i); + $objp = $db->fetch_object($result); Header("Location: fiche.php?id=$objp->rowid"); } @@ -197,7 +197,7 @@ if ($result) $var=True; while ($i < min($num,$limit)) { - $objp = $db->fetch_object( $i); + $objp = $db->fetch_object($result); $var=!$var; print ""; print "rowid\">"; @@ -210,7 +210,7 @@ if ($result) print "\n"; $i++; } - $db->free(); + $db->free($result); print "";