Nieuw lid |
|
Dag mensjes, ik hoop dat iemand hier het antwoord op weet.
Ik heb 4 tabellen , die allemaal verschillend zijn ( dus normale join zit er niet in)..
Nou wil ik ze allemaal tegelijk pakken..
deze werkt prima met twee tabellen
$sql='(SELECT * FROM crawl_xvid WHERE found ="yes")
UNION (SELECT * FROM crawl_dvdr WHERE found ="yes") ORDER BY views DESC ';
$sql='(SELECT * FROM crawl_xvid WHERE found ="yes") UNION (SELECT * FROM crawl_dvdr WHERE found ="yes") ORDER BY views DESC ';
maar als ik er 4 doe, dan doet hij het niet
$sql='(SELECT * FROM crawl_xvid WHERE found ="yes")
UNION (SELECT * FROM crawl_dvdr WHERE found ="yes") UNION (SELECT * FROM crawl_games WHERE found ="yes")
UNION
(SELECT * FROM crawl_tv WHERE found ="yes") ORDER BY views DESC ';
$sql='(SELECT * FROM crawl_xvid WHERE found ="yes") UNION (SELECT * FROM crawl_dvdr WHERE found ="yes") UNION (SELECT * FROM crawl_games WHERE found ="yes") UNION (SELECT * FROM crawl_tv WHERE found ="yes") ORDER BY views DESC ';
Hoe zou ik het moeten aanpakken?
|