Welcome Guest, Not a member yet? Register   Sign In
Postgres and CodeIgniter?
#1

[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,
#2

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

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

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


Best Regards,
André.
#4

[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.
#5

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

Thks.

Best Regards
#6

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

[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.
#8

[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




Theme © iAndrew 2016 - Forum software by © MyBB