Hi,
i need to recreate the function requete()
function requete($var,$var2)
i imagine the return is an array but i can not found how to recreate the function
$formule=array("M1", "P1", "P2", "P3", "P4", "P5", "P6",
foreach ($formule as $key=>$value) {
${'req_'.$value}=requete("SELE... tarif FROM tarifs WHERE age=".$age." and genre=".$rens_pers['sexe']." and regime=".$rens_pers['regime'].... and formule='$value'","req_ tarif");
${'req_'.$value} is an querys array?
how can i return it and use it?
anyone have an idea?
thank you for your help
2007-09-12
05:34:10
·
3 answers
·
asked by
locin4r
1
in
Computers & Internet
➔ Programming & Design
i finally found the aswer:
function requete($sql_requete, $message) {
$resultat=mysql_query($sql_requete) or die ('
'.mysql_error().' avec
'.$sql_requete.'
Message : '.$message.'
');
$i=0;
//echo $sql_requete."
";
while($data = mysql_fetch_array($resultat))
{
$y=0;
foreach($data as $key => $value)
{
if($y%2) $tableau[$i][$key]=$value;
$y++;
}
$i++;
}
return $tableau;
but when i send my array tho the function who use the fonction requete();
i can not pass values of my array
i able to send source code by mail cause he is huge the i dont want put everything here.
thanks for your help
}
2007-09-12
10:26:01 ·
update #1