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

MySQL GroupBy improper quoting #7

Open
intel352 opened this issue Sep 28, 2010 · 0 comments
Open

MySQL GroupBy improper quoting #7

intel352 opened this issue Sep 28, 2010 · 0 comments

Comments

@intel352
Copy link

Okay, so maybe I'm not using GroupBy as intended, but I've found that when specifying a column to be grouped, the column string is returned back, single-quoted. This results in unexpected behavior in MySQL. For instance, if I run the resulting query (with a single-quoted column), I get 1 row returned from the query. If I run the query with a backtick/apostrophe-quoted column, I get a range of rows, grouped properly.

I believe this is due to the GroupBy class passing the string into Crystal_Helper_Mysql::add_single_quote instead of Crystal_Helper_Mysql::add_apostrophe

Just a note, the postgres GroupBy method uses Crystal_Helper_Postgres::sanitize_string instead, which is quite an interesting difference.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant