Hi,
i have the following problem:
2 tables (first: events, second: projekte)
and I have a field in the “projekte”-table (“unsichtbar”) which should show the events-table, that the events in that project should not be visible… The “events.id” is the primary field of the “events”-table.
My code is the following:
$scheduler->render_sql("SELECT events.event_name as label, events.start_date as value, events.end_date as value, events.details as label, events.welchesprojekt as value, events.rec_type as value, events.event_pid as value, events.event_length as value, events.userID as value, events.event_type as value, events.erstellungsdatum_event as value, projekte.unsichtbar as value FROM projekte INNER JOIN events ON projekte.projekt_id = events.welchesprojekt WHERE projekte.unsichtbar='0'","event_id","start_date(value),end_date(value),event_name(label),details(label),welchesprojekt(value),userID(value),event_type(value),erstellungsdatum_event(value)");
When I do this (in that case in combination with enabled live update), I get the error message
SELECT * FROM actions_table LEFT OUTER JOIN projekte INNER JOIN events ON projekte.projekt_id = events.welchesprojekt ON actions_table.DATAID = projekte INNER JOIN events ON projekte.projekt_id = events.welchesprojekt.event_id WHERE ( projekte.unsichtbar='0') AND ( actions_table.ID > '212' AND actions_table.USER <> '1341428197148')
!!!Uncaught Exception
Code: 0
Message: MySQL operation failed
Not unique table/alias: 'events'
I can’t find out what I am doing wrong here…
Any help?
Thank you very much!
Martin