What happen with MySQL 5?

The following query can run on MySQL 4.1 but can not on MySQL 5.0.x:

SELECT c.*, rst.starttimenameFROM tblcourse c, tblcourse_category_extra ceLEFT JOIN tblref_starttime rst ON rst.starttimeid = c.starttimeidWHERE ce.courseid = c.courseidORDER BY c.approveddate DESC

Anyone can help to explain?

Thanks.

It would be helpful if you explain what do you mean by can’t be run - is it way to slow or what is error message ?

I would guess you’re mentioning

tblcourse table field in the LEFT JOIN clause which is forbidden in MySQL 5.0 - only joined tables can be refered in ON clause.

safari,

try next query

SELECT c.*, rst.starttimenameFROM (tblcourse c, tblcourse_category_extra ce)LEFT JOIN tblref_starttime rst ON rst.starttimeid = c.starttimeidWHERE ce.courseid = c.courseidORDER BY c.approveddate DESC

Syntax was changed in 5.0.13

it works now. thanks vadim.