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

Merged
merged 2 commits into from Nov 20, 2012

Projects

None yet

2 participants

@TedThiCo
Contributor

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

@TedThiCo TedThiCo 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'
2f32890
@narfbg
Contributor
narfbg commented Nov 19, 2012

Isn't this better?

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

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.

@narfbg
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? :)

@TedThiCo
Contributor

I'm glad to hear that :)

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

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

1 check passed

default The Travis build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment