Welcome Guest, Not a member yet? Register   Sign In
Field Name Problem In CI3
#4

(11-24-2014, 02:39 PM)mertdogan Wrote: I've used


Code:
$this->db->query("SELECT [ID],[A],[B] FROM TABLE");

in my CI2 installation and all of my queries executed without problem. I'm using SQL Server 2012 and sqlsrv driver as database platform.

But when i try to upgrade my installation to CI3, bracketed fields generates error [XXX] field not found. When i remove bracket everything workes well again.

Why did you remove bracket support in CI3 or did i something wrong?

It's not removed, and especially in the query() method - if something fails, it's the query that's erroneous. Your server might be configured to escape with double quotes instead of square brackets though (and it should be, that's the SQL standard).

(11-24-2014, 03:24 PM)Rufnex Wrote: I never used this in that way. On SQL Server you can also write id, a, b etc. You can try to disable db debugging. For that change your settings in /application/config/database.php


PHP Code:
    'db_debug' => false

Or you change the value on the fly like


PHP Code:
$this->db->db_debug false;
$this->db->query("SELECT [ID] FROM table");
$this->db->db_debug true

Maybe this work .. but no you have no debugging.

This would only turn off displaying the error message, it won't solve anything.
Reply


Messages In This Thread
Field Name Problem In CI3 - by mertdogan - 11-24-2014, 02:39 PM
RE: Field Name Problem In CI3 - by Rufnex - 11-24-2014, 03:24 PM
RE: Field Name Problem In CI3 - by slax0r - 11-25-2014, 01:23 AM
RE: Field Name Problem In CI3 - by Narf - 11-25-2014, 01:35 AM
RE: Field Name Problem In CI3 - by mertdogan - 11-26-2014, 10:16 AM
RE: Field Name Problem In CI3 - by caju - 11-30-2014, 07:29 PM



Theme © iAndrew 2016 - Forum software by © MyBB