|
|
|
|
|
|
|
|
 
|
".mysql_error()."...");
while ($ligne=mysql_fetch_row($resultq))
{
$nbprod=$ligne[0];
}
print "il y a $nbprod resultat
 ";
$requete = "select idprod,denomination,description,refconst from produit where idmarque='$marq'";
$result=mysql_query($requete) or die ("Erreur SQL :$requete
".mysql_error()."...");
while ($ligne=mysql_fetch_row($result))
{
$idprod=$ligne[0];
$nom=$ligne[1];
$desc=$ligne[2];
$ref=$ligne[3];
?>
|
|
|
|
|
|
".mysql_error()."...");
while ($ligne=mysql_fetch_row($resultq))
{
$nbprod=$ligne[0];
}
print "il y a $nbprod resultats
 ";
$requete= "
select distinct idprod,denomination,description,refconst,m.idmarque,marque,p.idfamille,f.nomfamille,f.idcateg,c.nomcateg
from produit p,categorie c,famille f,marques m
where
p.idmarque=m.idmarque AND p.idfamille=f.idfamille AND f.idcateg=c.idcateg
AND ((lower(denomination) LIKE lower('%$rech%')) OR (lower(description) LIKE lower('%$rech%')) OR (lower(refconst) LIKE lower('%$rech%')) OR (lower(marque) LIKE lower('%$rech%')) OR (lower(nomcateg) LIKE lower('%$rech%')) OR (lower(nomfamille) LIKE lower('%$rech%')))
Order by nomcateg,nomfamille";
$result=mysql_query($requete) or die ("Erreur SQL :$requete
".mysql_error()."...");
$cat="";
$fam="";
while ($ligne=mysql_fetch_row($result))
{
$idprod=$ligne[0];
$nom=$ligne[1];
$desc=$ligne[2];
$ref=$ligne[3];
$idmarque=$ligne[4];
$marque=$ligne[5];
$idfamille=$ligne[6];
$famille=$ligne[7];
$idcateg=$ligne[8];
$categorie=$ligne[9];
?>
|
|
|
|
|
|
|
|
 
|
 
|
|
|
|
|