Recherche multicretere php

JEANPAUL207 Messages postés 4 Statut Membre -  
 rtfm -
je cherche comment faire une recherche SUR une bdd mysql a partir d'un formulaire COMPORTANT plusieurs champs liste deroulante et champs texte ....

1 réponse

  1. rtfm
     
    select t1.champA, t1.champB, t2.champC
    from table1 t1, table2 t2
    where t1.id = t2.idref -- jointure
    and CRITERE1 = $input1 -- 1er critere
    and CRITERE2 = $input2 -- 2eme critere
    and CRITERE3 between $input3 and $input4 -- 3eme critere

    c'est bien une requete multi-critere
    0