Kann mir bitte mal jemand helfen und mir sagen warum mein folgender SELECT Befehl auch Datensätze ausgibt deren pmb_firma.id_branche ungleich 8 sind ???
SELECT pmb_firma.*, pmb_branche.*, pm_region.* FROM pmb_firma
LEFT JOIN pmb_branche ON pmb_firma.id_branche = pmb_branche.id_branche
LEFT JOIN pm_region ON pmb_firma.id_region = pm_region.id_region
WHERE firmenname LIKE '%und%' OR beschreibung LIKE '%und%' OR inhaber LIKE '%und%'
AND pmb_firma.id_branche = '8' LIMIT 0,5
SELECT pmb_firma.*, pmb_branche.*, pm_region.* FROM pmb_firma
LEFT JOIN pmb_branche ON pmb_firma.id_branche = pmb_branche.id_branche
LEFT JOIN pm_region ON pmb_firma.id_region = pm_region.id_region
WHERE firmenname LIKE '%und%' OR beschreibung LIKE '%und%' OR inhaber LIKE '%und%'
AND pmb_firma.id_branche = '8' LIMIT 0,5
Kommentar