PDA

View Full Version : Ext JS CRUD with PostgreSQL



davedran
25 Jun 2014, 5:48 AM
Hi!

I have used and got CRUD working using Ext JS 4 , using this GITHUB Sample at
https://github.com/ErnestoR/Extjs4_PHP_MySQL

The MySQL connection was :-


<?php


$con = mysql_connect("localhost","root","root");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}


mysql_select_db("CRUD_Extjs4", $con);




?>



I tried changing this connection for Postgresql database but fails with a blank screen.


<?
$connection=pg_connect("host=localhost port=5432 dbname=kpi user=postgres password=password2014");
$result = pg_query('SELECT * FROM audits');


$rows = array();
while($r = pg_fetch_assoc($result)) {
$con[] = $r;
}


?>

What am I doing wrong, is there an example of Ext JS Postgresql connection that I can refer.

Thank you.

David

Gary Schlosberg
5 Jul 2014, 10:04 AM
I was only able to find these older threads, one of which you found and wisely posted on.
http://www.sencha.com/forum/showthread.php?27873
http://www.sencha.com/forum/showthread.php?133282

Perhaps the db connection stuff is still relevant in that zip?