Welcome Guest, Not a member yet? Register   Sign In
A little bug DB_active_rec.php function _compile_select for postgresql
#2

[eluser]James Gifford[/eluser]
I just switched to the final 1.6.0 release and I have also noticed an error with queries using a PostgreSQL database.

CI is now putting parentheses around the tables in the FROM clause like this:
Code:
SELECT * FROM ("posts") ORDER BY "date_created" LIMIT 20

The parenthesis don't seem to be proper Postgres syntax as the query will work fine without them. Also, I don't remember CI putting quotes around the field names before, but this is not causing problems with the query.

EDIT:
Changing line 489 in postgre_driver.php from this:
Code:
return '('.implode(', ', $tables).')';
to this:
Code:
return implode(', ', $tables);

fixed the problem.


Messages In This Thread
A little bug DB_active_rec.php function _compile_select for postgresql - by El Forum - 01-31-2008, 12:03 PM



Theme © iAndrew 2016 - Forum software by © MyBB