roben
Gebruiker
- Lid geworden
- 4 dec 2008
- Berichten
- 65
Kan iemand mij vertellen waarom deze query het niet doet,
en deze wel?
en deze ook?
PHP:
SELECT DISTNCT t.type_id, t.photo AS photo, t.type_id AS typeid, t.name AS type, b.name AS brand
FROM types t, brands b LEFT JOIN reviews r ON t.type_id = r.type_id_fk
WHERE t.brand_id_fk = b.brand_id $brandsresult AND $merken t.status LIKE '1'
AND b.top LIKE '1' AND b.status LIKE '1' ORDER BY b.name ASC
en deze wel?
PHP:
SELECT DISTNCT t.type_id, t.photo AS photo, t.type_id AS typeid, t.name AS type, b.name AS brand
FROM types t, brands b
WHERE t.brand_id_fk = b.brand_id $brandsresult AND $merken t.status LIKE '1'
AND b.top LIKE '1' AND b.status LIKE '1' ORDER BY b.name ASC
en deze ook?
PHP:
SELECT DISTINCT t.type_id, t.name AS type, t.photo AS typephoto, b.*
FROM brands b, types t LEFT JOIN reviews r ON t.type_id = r.type_id_fk
WHERE t.brand_id_fk = b.brand_id AND b.status = 1 AND t.photo <> ''
AND t.status = 1 " . $sExtraProducts . " ORDER BY r.select3 DESC LIMIT 1