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

Removing "`" from db query. #3165

Merged
merged 2 commits into from Feb 23, 2017

Conversation

daniel-samson
Copy link
Contributor

@daniel-samson daniel-samson commented Feb 20, 2017

Description

The issue was related to #1525, #856 and #875.

Prospect Lists:
Quoting the column 'type' because it is a keyword in MySQL is bug.
The responsibility should be in the database manager. I have
removed the quotes and the query seems to work without them.

I can't see why it was added in the first place as both engines on
MySQL and SQL seem to process the query without the need for
quotations or brackets. Perhaps it was just as a precaution.

Reports:
I have added the quoteIdentifier to reports, because the table alias is quoted and the quotation should be handled by the database manager.

Motivation and Context

  • Provides a more correct solution

How To Test This

  • Retest the issues I have linked.

This change has been tested on:

  • Ubuntu 14.04 PHP 5.6 / MySQL 5.6
  • Ubuntu 16.04 PHP 7 / MySQL 5.7
  • Windows Server 2008 R2 / SQL Server 2008 R2

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Final checklist

  • My code follows the code style of this project found here.
  • My change requires a change to the documentation.
  • I have read the How to Contribute guidelines.

Daniel Samson added 2 commits February 20, 2017 15:24
Quoting the column 'type' because it is a keyword in MySQL is bug.
The responsibility should be in the database manager. I have
removed the quotes and the it seems to work without them.

I can't see why it was added in the first place as both engines on
MySQL and SQL seem to process the query without the need for
quotations or brackets. Perhaps it was just as a precaution.

This change has been tested on:
* Ubuntu 14.04 PHP 5.6 / MySQL 5.6
* Ubuntu 16.04 PHP 5.7 / MySQL 5.7
* Windows Server 2008 R2 / SQL Server 2008 R2

The issue was related to salesagility#1525
This ensures that it will work with all database managers.
@samus-aran samus-aran added the Status:In Review Pull Requests that are activity being reviewed by the core team label Feb 23, 2017
@samus-aran samus-aran merged commit 279cc57 into salesagility:hotfix Feb 23, 2017
@Dillon-Brown Dillon-Brown removed the Status:In Review Pull Requests that are activity being reviewed by the core team label Sep 6, 2017
@daniel-samson daniel-samson deleted the hotfix_scrm_297 branch November 20, 2017 11:16
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

Successfully merging this pull request may close these issues.

None yet

3 participants