MSSQL driver does not handle escaping of database names correctly |
|||
|---|---|---|---|
| Date: | 07/23/2008 | Severity: | Minor |
| Status: | Resolved | Reporter: | Matthieu Fauveau |
| Version: | 1.6.3 | ||
| Keywords: | |||
| Forum Thread: | http://codeigniter.com/forums/viewthread/86055 | ||
Description
In MSSQL, to escape the name of a database that contains spaces, hyphens, underscores, or any other exceptional characters, the database name must be enclosed in brackets.
Code Sample
$query = $this->db->get("MY_TABLE");
Expected Result
A result object.
Actual Result
A Database Error Occurred
Error Number:
SELECT * FROM MY_TABLE
