Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't use functions like UPPER in where clause #86

Closed
xtazz opened this issue Sep 10, 2011 · 2 comments
Closed

Can't use functions like UPPER in where clause #86

xtazz opened this issue Sep 10, 2011 · 2 comments

Comments

@xtazz
Copy link

xtazz commented Sep 10, 2011

Queries like this: Jelly::query('table')->...->where('UPPER(table.field_name)','IN',$field_values)
are resulting in following SQL code: ...WHERE UPPER(table.field_name) IN ('VALUE1', 'VALUE2')

This code is causing MySQL to fail query because ` are incorrectly placed for such where clauses.

If it's Kohana issue, please let me know, I'll resubmit this bug to them.

Thanks!

Best Regards,
Peter

@leth
Copy link

leth commented Sep 12, 2011

Try using a DatabaseExpression object. Look up the kohana docs for DB:expr(...).

@xtazz
Copy link
Author

xtazz commented Sep 13, 2011

Thanks much! Now it works okay

@xtazz xtazz closed this as completed Sep 13, 2011
@creatoro creatoro reopened this Sep 15, 2011
@ghost ghost assigned creatoro Sep 15, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants