CodeIgniter Forums
Postgres and CodeIgniter? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Postgres and CodeIgniter? (/showthread.php?tid=23460)



Postgres and CodeIgniter? - El Forum - 10-12-2009

[eluser]Sinclair[/eluser]
Hi,

I'am trying to develop an web app using CI and PostgreSQL but I don't have success using Postgres... I have changed to MySQL and all is OK now. But my question, CI is really compatible with Postgres?

Best Regards,


Postgres and CodeIgniter? - El Forum - 10-12-2009

[eluser]imn.codeartist[/eluser]
what was the error that gave to you when you tried to connect with the postgre?


Postgres and CodeIgniter? - El Forum - 10-12-2009

[eluser]Sinclair[/eluser]
Thks for the reply.

I got blank screen when I configure the database for Postgres. Any clues?


Best Regards,
André.


Postgres and CodeIgniter? - El Forum - 10-12-2009

[eluser]wabu[/eluser]
Hello, I use Postgres with CI.

To simplify things you could try the following sample code (you can just drop the code into a controller function if you like):

http://www.php.net/manual/en/pgsql.examples-basic.php

If this works then you probably need to fix something in your CI database configuration file. If it doesn't work then it's probably not a CI problem and more likely an auth issue.


Postgres and CodeIgniter? - El Forum - 10-13-2009

[eluser]Sinclair[/eluser]
The problem was in the PHP.ini

Thks.

Best Regards


Postgres and CodeIgniter? - El Forum - 06-14-2011

[eluser]KKS[/eluser]
I am working with multiple database (mysql, postgresql) at a time.
postgresql with CI 2.0 works fine


Postgres and CodeIgniter? - El Forum - 07-27-2011

[eluser]agusnur24[/eluser]
Hi,

Right now I'm trying to change my database driver from MySQL to PostgreSQL.
Do i have to configure database on CI database or php.ini?
And how can I use multiple database at a time like KKS above?

Thx.


Postgres and CodeIgniter? - El Forum - 08-13-2011

[eluser]Jason Tan Boon Teck[/eluser]
[quote author="agusnur24" date="1311839283"]Hi,

Do i have to configure database on CI database or php.ini?

[/quote]

Code:
$db['default']['dbdriver'] = "postgre";

inside database.php