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!
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.