POSTGRES Free Version 2.0 for test

QuestionsPOSTGRES Free Version 2.0 for test
Frederic asked 7 years ago

Hi,

Do you support POSTGRES on free version 2.0, Latest download available ?
Actually i get this message :

You must have PostgreSQL installed for this demo. Also set database crendentials in this demo. Click on Code tab for source.

I update, the credentials, but always the same problem !

12 Answers
Abu Ghufran answered 7 years ago

If you are following demos/loading/db-layer-pgsql.php then…

To enable debugging errors,

1) Turn errors on. Goto jqgrid_dist.php make it 'on'

error_reporting(E_ALL); // show all messages
ini_set("display_errors","on"); // changed from off to on

2) If you are using non-mysql database,

$g = new jqgrid($db);

$g->con->debug = 1;

Frederic answered 7 years ago

Hi,

Thank you, for your answer. Yes I follow demos/loading/db-layer-pgsql.php

I enable debugging errors :

error_reporting(E_ALL); ini_set("display_errors","on");
and $g->con->debug = 1;

Below my report :
(postgres7): SELECT * FROM clients WHERE 1=1 LIMIT 1 OFFSET 0

No more details, only a pop up windows error with no message, and i can see the grid whith header column name as my data table, but no data display for each column.

Any more idea ?

BR

Frederic answered 7 years ago

Hi,

I m on HTTPS, the error windows cannot show error message.

When i m ON HTTP i can see that on error windows message :

(postgres7): SELECT * FROM dbm_magasin WHERE 1=1 LIMIT 1 OFFSET 0
(postgres7): SELECT count(*) as c FROM (SELECT * FROM dbm_magasin WHERE 1=1) pg_tmp
(postgres7): SELECT * FROM dbm_magasin WHERE 1=1 ORDER BY 1 asc LIMIT 5 OFFSET 0
{"page":1,"total":3,"records":"13","rows":[{"ID":"1","ID_MAGASIN":"14"},{"ID":"2","ID_MAGASIN":"13"},{"ID":"2519001","ID_MAGASIN":"2"},{"ID":"2519002","ID_MAGASIN":"3"},{"ID":"2519003","ID_MAGASIN":"4"}]}

Any Idea ?

BR

Abu Ghufran answered 7 years ago

Yes, thats because https is not supported in free version.
You can disable debugging and test-run it on http.

Frederic answered 7 years ago

Error Message and Debug when i test On http :

ON HTTP i can see that on error windows message :

(postgres7): SELECT * FROM dbm_magasin WHERE 1=1 LIMIT 1 OFFSET 0
(postgres7): SELECT count(*) as c FROM (SELECT * FROM dbm_magasin WHERE 1=1) pg_tmp
(postgres7): SELECT * FROM dbm_magasin WHERE 1=1 ORDER BY 1 asc LIMIT 5 OFFSET 0
{"page":1,"total":3,"records":"13","rows":[{"ID":"1","ID_MAGASIN":"14"},{"ID":"2","ID_MAGASIN":"13"},{"ID":"2519001","ID_MAGASIN":"2"},{"ID":"2519002","ID_MAGASIN":"3"},{"ID":"2519003","ID_MAGASIN":"4"}]}

-> And no data no data display for each column.

Abu Ghufran answered 7 years ago

Please disabled errors and try again:
error_reporting(E_ALL); ini_set("display_errors","off");
and $g->con->debug = 0;

selectcas.biz answered 7 years ago

Ok, better…

I get now, the good number of row in the grid, put no data on cell for each rows.
I test to delete -> OK
I test to insert -> OK on data table, mais nothing visible on cell grid
I test to update -> KO

Any Idea ?

BR

Abu Ghufran answered 7 years ago

Use firefox->firebug->net->ajax-call of grid->response. You will see the output there, in case of any error. It should be proper JSON format data in order to render grid

Review this tutorial for '[debugging with firebug](https://phpgrid.desk.com/customer/portal/articles/926266)'.

Frederic answered 7 years ago

STATUS 200 OK

Reponse JSON:

{"page":1,"total":1,"records":"13","rows":[{"ID":"1","ID_MAGASIN":"14"},{"ID":"2","ID_MAGASIN":"13"}
,{"ID":"2519001","ID_MAGASIN":"2"},{"ID":"2519002","ID_MAGASIN":"3"},{"ID":"2519003","ID_MAGASIN":"4"
},{"ID":"2519004","ID_MAGASIN":"5"},{"ID":"2519005","ID_MAGASIN":"6"},{"ID":"2519006","ID_MAGASIN":"7"
},{"ID":"2519007","ID_MAGASIN":"10"},{"ID":"2519008","ID_MAGASIN":"9"},{"ID":"2519009","ID_MAGASIN":"8"
},{"ID":"2519010","ID_MAGASIN":"11"},{"ID":"2519011","ID_MAGASIN":"12"}]}

ANY IDEA ?

Abu Ghufran answered 7 years ago

Make sure your $col["name"] property is exactly same as ID or ID_MAGASIN (case sensitive)
It is required to map json data on column fields.

PGSQL is returning it in caps, so we must have names in caps as well.

Frederic answered 7 years ago

Hi,

I add this snippet of code to manage CAPS of column. Always no grid data display !

—-

$col = array();
$col["title"] = "ID"; // caption of column, can use HTML tags too
$col["name"] = "ID"; // grid column name, same as db field or alias from sql
$col["width"] = "20"; // width on grid
$col["editable"] = true;
$cols[] = $col;

$col = array();
$col["title"] = "ID_MAGASIN"; // caption of column, can use HTML tags too
$col["name"] = "ID_MAGASIN"; // grid column name, same as db field or alias from sql
$col["width"] = "40"; // width on grid
$col["editable"] = true;
$cols[] = $col;
$g->set_columns($cols);

—–

Any more IDEA ?

Abu Ghufran answered 7 years ago

I am unable to get the issue. Please email me grid code + database table sql file to generate case here (at [email protected])

Otherwise, We can also have a quick remote session. Check your email for scheduling.

Your Answer

18 + 6 =

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?