Use an other test

This commit is contained in:
John BOTELLA 2019-01-28 11:53:19 +01:00
parent 15e1d3b456
commit 9a666b265f

View File

@ -3015,11 +3015,13 @@ class CommandeFournisseurLigne extends CommonOrderLine
$sql.= ' WHERE cd.rowid = '.$rowid; $sql.= ' WHERE cd.rowid = '.$rowid;
$result = $this->db->query($sql); $result = $this->db->query($sql);
if ($result) if ($result)
{
if ($this->db->num_rows($result))
{ {
$objp = $this->db->fetch_object($result); $objp = $this->db->fetch_object($result);
if (!empty($objp))
{
$this->rowid = $objp->rowid; $this->rowid = $objp->rowid;
$this->id = $objp->rowid; $this->id = $objp->rowid;
$this->fk_commande = $objp->fk_commande; $this->fk_commande = $objp->fk_commande;