PHP Notice: Array to string conversion in
Je m'arrache les cheveux sur ce code.
J'ai le message mentionné en sujet dès que j'utilise les variables $indice et $param.
$aTrigly est un array composé d'un array de deux valeurs.
Est-ce que quelq'un à une idée du pourquoi ?
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
foreach($arrayTrigly as $aTrigly)
{
$indice = $aTrigly[0];
$param = $aTrigly[1];
foreach($arrayProduct as $product)
{
$trouve = 0;
$res = executeQuery("select * from ".$table." where indice = ".$indice." and cdart = '".$product."'",$myconnexion);
while ( ($row = nextLigne($res)) )
{
$trouve = 1;
}
if($trouve == 0)
{
echo "ARTICLE : ".$product." : il manque colonne : ".$param.PHP_EOL;
echo "insert into ".$table." values(".$indice.", '".$product."',0,0,0,0)".PHP_EOL;
$message .= "Table triglycerides : Product: ".$product." - manque param ".$param." --> action : repaired\n\r";
// for testing executeQuery("insert into ".$table." values(".$indice.", '".$product."',0,0,0,0)",$myconnexion);
}
}
} |