Welcome Guest, Not a member yet? Register   Sign In
Quotes in Query Builder - Codeigniter 3.0.0
#1

Hello

I just updated a project to Codeigniter 3.0.0. It is an unusual project since the combination is PHP / MSSQL Database. There were some errors in Codeigniter 2.1.4 regarding the sqlsrv driver which are no fixed.

However, there seems to be a new problem for me: The new Query Builder sets quotes around the table name. What works fine in most cases, but it doesn't seem the check if it is a table name after all! So if I use some special queries, they get broken.

For example:

$this->db->where('NOT EXISTS .....

becomes

AND "NOT" EXISTS ...


$this->db->join('table_1', 'CAST(...

becomes

LEFT JOIN "table_1" ON "CAST"(...


So the first word in the queries gets some quotes which ruins the query. Am I the only one with this problem? Seems like a big issue for me? Any Solutions? Thank you.

Greetings
Marc
Reply
Reply




Theme © iAndrew 2016 - Forum software by © MyBB