Welcome Guest, Not a member yet? Register   Sign In
Problem with Quotes on PostgreSQL
#1

[eluser]Unknown[/eluser]
Hy there,

I'm coding my first CI application, and i'm created my database tables without " double quotes because i don't want case sensitive in name of my tables, but now my queries using Active Record don't work, because CI is putting the double quotes.


Code:
CREATE TABLE sync
(
  sync_id serial NOT NULL,
  table character varying(60) NOT NULL,
  operation character(1) NOT NULL,
  date timestamp without time zone NOT NULL,
  CONSTRAINT sync_pkey PRIMARY KEY (sync_id)
)


Code:
$this->db->from('sync')->where('sync_id', $id);
$sync = $this->db->get();

and i'm receiving the follow error:

Error Number:

ERRO: relation "sync" dont't exist LINE 2: FROM "sync" ^

SELECT * FROM "sync"

The CI is creating the query with " double quotes.


Thanks in advance.




Theme © iAndrew 2016 - Forum software by © MyBB