Fix: Correction mauvaise utilisation de la methode fectch_object avec en paramètre un indice au lieu d'un resultset.
This commit is contained in:
parent
eb0c2e2ced
commit
fa4771c80e
@ -117,13 +117,13 @@ $result = $db->query($sql) ;
|
|||||||
|
|
||||||
if ($result)
|
if ($result)
|
||||||
{
|
{
|
||||||
$num = $db->num_rows();
|
$num = $db->num_rows($result);
|
||||||
|
|
||||||
$i = 0;
|
$i = 0;
|
||||||
|
|
||||||
if ($num == 1 && (isset($_POST["sall"]) or $snom or $sref))
|
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");
|
Header("Location: fiche.php?id=$objp->rowid");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -197,7 +197,7 @@ if ($result)
|
|||||||
$var=True;
|
$var=True;
|
||||||
while ($i < min($num,$limit))
|
while ($i < min($num,$limit))
|
||||||
{
|
{
|
||||||
$objp = $db->fetch_object( $i);
|
$objp = $db->fetch_object($result);
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print "<tr $bc[$var]><td>";
|
print "<tr $bc[$var]><td>";
|
||||||
print "<a href=\"fiche.php?id=$objp->rowid\">";
|
print "<a href=\"fiche.php?id=$objp->rowid\">";
|
||||||
@ -210,7 +210,7 @@ if ($result)
|
|||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
$db->free();
|
$db->free($result);
|
||||||
|
|
||||||
print "</table>";
|
print "</table>";
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user