PHP Grid Free Version Postgresql

QuestionsPHP Grid Free Version Postgresql
Michael asked 7 years ago

Hi All,

I was trying to do the automatic installation for phpgrid.
There seem to be no option for me to connect to Postgresql.
The installer only give choices to connect to mysql and mysqli.

After installing (connect to mysql), I realised in the 'DEMO' section, in the 'Loading' tab, there is an option to connect to Db Layer Pgsql

I modified the credentials in the corresponding code, and is able to connect to Postgresql.

However, when the grid tries to load my table, it shows this message:

"You must have PostgreSQL installed for this demo. Also set database crendentials in this demo. Click on Code tab for source. {"page":1,"total":1,"records":"2","rows":[{"Name":"Charles","Gender":"M","Age":"24"},{"Name":"Erik","Gender":"M","Age":"25"}]}"

Notice that row 3 to 5 of the message is actually the content of my table.

Can anyone advise on what's the issue here?

Thank you!

1 Answers
Abu Ghufran answered 7 years ago

Make sure you call '$g->render();' function before any HTML is rendered
(echo'd) to output, as it expect exact JSON format for ajax calls. You can echo the output of render() function to desired location in html.

Move the render() function call before html and it should render data.

Your Answer

17 + 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?