Hello Ilya
Thanks for your quick reply. If I use the alias notation I got the following error …
SELECT jos_jf_tasks.id,jos_jf_tasks.startdate AS sdate,jos_jf_tasks.duedate AS ddate,jos_jf_tasks.name AS tname,jos_jf_tasks.description,jos_jf_milestones.name AS mname FROM jos_jf_tasks JOIN jos_jf_milestones ON jos_jf_tasks.milestone=jos_jf_milestones.id WHERE sdate < ‘2011-10-01’ AND ddate > ‘2011-08-01’
!!!Uncaught Exception
Code: 0
Message: MySQL operation failed
Unknown column ‘sdate’ in ‘where clause’
I have no idea, where I am wrong …
Thanks in advance for your help …
Hello Ilya
Thanks for your reply. But it doesn’t work. What I would like to have is the following SQL statement to populate the Scheduler:
select jos_jf_tasks.id,jos_jf_tasks.startdate,jos_jf_tasks.duedate,jos_jf_tasks.name,jos_jf_tasks.description,jos_jf_milestones.name from jos_jf_tasks join jos_jf_milestones on jos_jf_tasks.milestone = jos_jf_milestones.id;
How should I formulate it correctly in a render_sql statement?
Sorry for my beginner questions, but I am really lost …
Sorry for the late response.
Please try following:
$scheduler->render_sql("SELECT *, ev.start_date as start_date1, ev_rec.start_date as start_date2 FROM EVENTS_REC as ev_rec, EVENTS as ev", "event_id", "start_date, end_date, event_name, details, start_date1, start_date2");
Code itself doesn’t have much meaning but you can see how you can select two fields with the same name:
Add aliases for tables
Add aliases for fields
Kind regards,
Ilya
Get a guaranteed answer from DHTMLX technical support team
under the most suitable support plan