Issue found in select function of db #464

Closed
maneeshnsony opened this Issue Sep 20, 2011 · 2 comments

Projects

None yet

3 participants

@maneeshnsony

Escape identifiers not working after taking update. It seems bug in core code of db active record class.

@maurya777

Yes, Maneesh is right. I can confirm it.
If we do something like
$this->db->select('DATE_ADD(start_time, INTERVAL 0 MINUTE)', FALSE);

It produces a query in which the above is replaced with.
"DATE_ADD(start_time, INTERVAL 0 MINUTE)"
Putting back-ticks around INTERVAL keyword.

As far as we have debugged it, we have found that. Earlier we used to escape per query, but now we are trying to escape column by column. Moreover, the select() method in CI_DB_active_record explodes the given arguments by "," and converts the above string into two different columns, that itself is not acceptable.

@narfbg
Collaborator
narfbg commented May 24, 2012
@narfbg narfbg closed this May 24, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment