Fix: Test pour éviter erreurs
This commit is contained in:
parent
64ee49be81
commit
22565a5cad
@ -979,39 +979,43 @@ class Propal
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Renvoie un tableau contenant les commandes associées
|
* \brief Renvoie un tableau contenant les commandes associées
|
||||||
* \remarks Fonction plus lourde que commande_liste_array
|
* \remarks Fonction plus lourde que commande_liste_array
|
||||||
* \sa commande_liste_array
|
* \sa commande_liste_array
|
||||||
*/
|
*/
|
||||||
function associated_orders ()
|
function associated_orders()
|
||||||
{
|
{
|
||||||
$ga = array();
|
$ga = array();
|
||||||
|
|
||||||
$sql = "SELECT fk_commande FROM ".MAIN_DB_PREFIX."co_pr";
|
$sql = "SELECT fk_commande FROM ".MAIN_DB_PREFIX."co_pr";
|
||||||
$sql .= " WHERE fk_propale = " . $this->id;
|
$sql.= " WHERE fk_propale = " . $this->id;
|
||||||
if ($this->db->query($sql) )
|
if ($this->db->query($sql) )
|
||||||
{
|
{
|
||||||
$nump = $this->db->num_rows();
|
$nump = $this->db->num_rows();
|
||||||
|
|
||||||
if ($nump)
|
if ($nump)
|
||||||
{
|
{
|
||||||
$i = 0;
|
$i = 0;
|
||||||
while ($i < $nump)
|
while ($i < $nump)
|
||||||
{
|
{
|
||||||
$obj = $this->db->fetch_object();
|
$obj = $this->db->fetch_object();
|
||||||
$order=new Commande($this->db);
|
$order=new Commande($this->db);
|
||||||
$order->fetch($obj->fk_commande);
|
|
||||||
$ga[$i] = $order;
|
if ($obj->fk_commande)
|
||||||
$i++;
|
{
|
||||||
}
|
$order->fetch($obj->fk_commande);
|
||||||
}
|
$ga[$i] = $order;
|
||||||
return $ga;
|
}
|
||||||
}
|
$i++;
|
||||||
else
|
}
|
||||||
{
|
}
|
||||||
print $this->db->error();
|
return $ga;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print $this->db->error();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user