sneakyimp
11-08-2006, 02:02 AM
ok...i came up with this query:
SELECT e.id, e.title, e.subheading, e.zip, eta.start_timestamp, eta.end_timestamp, z.city, z.st
FROM demo_events e, demo_event_time_assoc eta, demo_zip_codes z
WHERE eta.event_id = e.id
AND z.zip = e.zip
AND e.active =1
AND (
(
(
eta.start_timestamp >=1162506800
)
AND (
eta.start_timestamp <=1163111600
)
)
OR (
(
eta.start_timestamp <1162506800
)
AND (
eta.end_timestamp >=1162510400
)
)
)
GROUP BY e.id
ORDER BY RAND( )
LIMIT 0 , 10
Is that a join query? What kind of join? Inner? Outer? Cross? Left? Right?
SELECT e.id, e.title, e.subheading, e.zip, eta.start_timestamp, eta.end_timestamp, z.city, z.st
FROM demo_events e, demo_event_time_assoc eta, demo_zip_codes z
WHERE eta.event_id = e.id
AND z.zip = e.zip
AND e.active =1
AND (
(
(
eta.start_timestamp >=1162506800
)
AND (
eta.start_timestamp <=1163111600
)
)
OR (
(
eta.start_timestamp <1162506800
)
AND (
eta.end_timestamp >=1162510400
)
)
)
GROUP BY e.id
ORDER BY RAND( )
LIMIT 0 , 10
Is that a join query? What kind of join? Inner? Outer? Cross? Left? Right?