Escaped mysql function in join condition
Escaped mysql function in join condition
 Bofferle            
            
                Posts: 1Questions: 1Answers: 0
Bofferle            
            
                Posts: 1Questions: 1Answers: 0            
            Hi there!
I'm trying to use a BETWEEN condition when joining a table using
->leftJoin( 'ageclass', ' YEAR(user.birthdate) BETWEEN ageclass.startYear AND ageclass.endYear ', '', '')
but my YEAR-functions ends up in
ON `YEAR`(user.birthdate) BETWEEN ageclass.startYear AND ageclass.endYear
Any ideas how I can avoid the escaping of the YEAR-function or any better solution for my BETWEEN condition?
Thank you!
This discussion has been closed.
            
Answers
I'm sorry - there is currently no way to use a
BETWEENoperation as a selector for the left join. The only way to do this is with a VIEW.The lack of ability to do complex joins is something we are aware of and will be looking at resolving.
Regards,
Allan