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

Already on GitHub? Sign in to your account

SQLSRV - Connection error if database name contains space-characters #2009

Merged
merged 2 commits into from Nov 20, 2012

Conversation

Projects
None yet
2 participants
Contributor

TedThiCo commented Nov 19, 2012

Connection error if database name contains space-characters.
Use of MSSQL brackets around database name =>
'USE [Database Name]' 
instead of
'USE Database Name'

Update system/database/drivers/sqlsrv/sqlsrv_driver.php
Connection error if database name contains space-characters. 
Use of MSSQL brackets => 
'USE [Database Name]' 
instead of 
'USE Database Name'
Contributor

narfbg commented Nov 19, 2012

Isn't this better?

$this->db->escape_identifiers($database);
Contributor

TedThiCo commented Nov 19, 2012

hello narfbg,

yeah probably the better way :)

I'm not involved in the code behind, so the suggestion is just the quick'n'dirty way i found in the v2.1.3.

Please excuse me if this is the wrong place for such suggestion.

Contributor

narfbg commented Nov 19, 2012

It's deffinately not the wrong place! Submitting a pull request is always the best way to contribute to and improve the project. :)

Would you update it with my suggestion or should I commit it myself? :)

Contributor

TedThiCo commented Nov 19, 2012

I'm glad to hear that :)

It should be commited. The right way, i hope.

narfbg added a commit that referenced this pull request Nov 20, 2012

Merge pull request #2009 from Eco91/patch-2
SQLSRV - Connection error if database name contains space-characters

@narfbg narfbg merged commit 52e7b24 into bcit-ci:develop Nov 20, 2012

1 check passed

default The Travis build passed
Details

nonchip pushed a commit to nonchip/CodeIgniter that referenced this pull request Jun 29, 2013

Merge pull request #2009 from Eco91/patch-2
SQLSRV - Connection error if database name contains space-characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment