Re: WB12 : Requete multifichier => Problème !

Posté par fucce le 7/8/2008 16:32:30
Un truc comme ça alors :
SELECT
Doc.Nodoc AS Nodoc,
Doc.titre AS titre,
Doc.sstitre AS sstitre,
Collec.Collection AS Collection
FROM
Collec INNER JOIN Doc ON Doc.nocolle = Collec.IDCollec
WHERE
((Collec.Collection LIKE %{cColl}% AND Collec.Collection<>'')
OR (Doc.titre LIKE %{cTitre}% AND Doc.titre<>''))
OR
(Doc.titre LIKE %{cTitre}% AND Doc.titre <> '' AND Collec.Collection = '')

A condition d'avoir dans ta table Collec une ligne avec Collection=''

Cette contribution était de : http://old.wdforge.org/newbb/viewtopic.php?forum=19&topic_id=5964&post_id=24057