I am an trainee as a software developer. I have a question: How can I access to multiple tables with select and join?
The name of the main-tables are like:
logs_0215
logs_0315
logs_mmyy -> m = month; y = year
The name of the timestamp-tables are like:
timestamp_0215
timestamp_0315
timestamp_mmyy -> m = month; y = year
My query which works only for one table is like:
SELECT a.id, b.stamp, c.name AS portal, d.name AS company, e.name AS protocol, a.value
FROM logs_0315 AS a
LEFT JOIN timestamp_0315 AS b ON a.time_id = b.id
LEFT JOIN portale AS c ON a.portal_id = c.id
LEFT JOIN companies AS d ON a.comp_id = d.id
LEFT JOIN proocols AS e ON a.prot_id = e.id
WHERE b.stamp BETWEEN '2015-05-01' AND '2015-06-25'
How can I access to all tables which contains logs_mmyy with its timestamp?
Thank you for your help in advance.
Yours sincerely
t.koelpin