[MySQL] Abfrage über mehrere Tabellen, variable Tabellenzahl,

Kombiniere mit #5

SQL:
SELECT * 
FROM
  (SELECT @rownum := 0 ) AS vars,
  (
    SELECT ....
    WHERE timestamp BETWEEN 1298867639000 AND 1298877639000 AND
    UNION SELECT ....
    WHERE timestamp BETWEEN 1298867639000 AND 1298877639000 AND
  ) AS myData
WHERE
  MOD((@rownum := @rownum+1), 7) = 0
 
Zuletzt bearbeitet von einem Moderator:
Zurück