PostgreSQL connection

QuestionsPostgreSQL connection
Bret Wagner asked 8 years ago

I am trying to switch from mysql to PostgreSQL and am having trouble connecting. This is the code I am using:

// set up DB

$db_conf = array();
$db_conf["type"] = "postgres"; // mysql,oci8(for oracle),mssql,postgres,sybase
$db_conf["server"] = "localhost";
$db_conf["user"] = "postgres";
$db_conf["password"] = "";
$db_conf["database"] = "SSIM";

include("inc/jqgrid_dist.php");
$g = new jqgrid($db_conf);

echo "THERE";

// Set grid parameters
$grid["caption"] = "Tenants";
$grid["multiselect"] = false;
$grid["rowNum"] = "10000";
$grid["shrinkToFit"] = true;
$grid["width"] = "1100";
$grid["height"] = "250";
// No stuff in the footer
$grid["pgbuttons"] = false;
$grid["pgtext"] = null;
$grid["pgtext"] = null;
$grid["viewrecords"] = false;
$grid["rowList"] = array();
$grid["resizable"] = true; // defaults to false

I do not get past the line $g = new jqgrid($db_conf);

I have connected to the PostgreSQL database using the connection:

$conn_string = "host=localhost dbname=SSIM user=postgres password='' ";

I am using version 1.4.6.

1 Answers
Abu Ghufran answered 8 years ago

The version you are using does not support it.
You need to download latest free version and test this code.

You can refer demos/loading/db-layer-pgsql.php code.

Your Answer

9 + 3 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?