Page 1 of 1

PGsql error

Posted: Wed Jan 14, 2009 8:03 am
by swraman
The exact error:

Code: Select all

Warning: pg_query() [function.pg-query]: Query failed: ERROR: syntax error at or near ")" LINE 1: INSERT INTO tr_projects () VALUES () ^ in C:\Program Files\BitNami WAPPStack\apache2\htdocs\updates\tracker\pgsql_database.php on line 190
 
Notice: Undefined variable: table_ in C:\Program Files\BitNami WAPPStack\apache2\htdocs\updates\tracker\pgsql_database.php on line 200
 
Notice: Undefined variable: column_seq in C:\Program Files\BitNami WAPPStack\apache2\htdocs\updates\tracker\pgsql_database.php on line 200
SELECT curval('')
Warning: pg_query() [function.pg-query]: Query failed: ERROR: current transaction is aborted, commands ignored until end of transaction block in C:\Program Files\BitNami WAPPStack\apache2\htdocs\updates\tracker\pgsql_database.php on line 190
 
Notice: Undefined variable: data in C:\Program Files\BitNami WAPPStack\apache2\htdocs\updates\tracker\pgsql_database.php on line 201
SELECT status FROM tr_projects WHERE id = '0'
Warning: pg_query() [function.pg-query]: Query failed: ERROR: current transaction is aborted, commands ignored until end of transaction block in C:\Program Files\BitNami WAPPStack\apache2\htdocs\updates\tracker\pgsql_database.php on line 190
 
Fatal error: Call to a member function GetNumRows() on a non-object in C:\Program Files\BitNami WAPPStack\apache2\htdocs\updates\tracker\project.php on line 398
The Code that it reffers to is (line 190):

Code: Select all

$result = pg_query($this->link, $query);
and

Code: Select all

$this->link =  INSERT INTO tr_projects () VALUES ()
$query = Resource id #10
It seemingly runs through fine with other values of $this->link (or at least it doesnt error for other values), for example it doesnt error with these values:

Code: Select all

$this->link =  SELECT id, firstname, lastname, phonenumber FROM tr_users WHERE email = 'someone@something.com'
$query = Resource id #10

Could this be a server setting error in any way? Im not too sure, but I believe the exact same code runs fine on a different server.

Any help would be appreciated.