when I turn on logs on the postgresql side, I've caught the following:
LOG: statement: SELECT "cc_logpayment.id" FROM "cc_logpayment" WHERE oid='32777'
ERROR: column "cc_logpayment.id" does not exist
obviously, postgresql-8.1 doesn't like double quotes:
Welcome to psql 8.1.4, the PostgreSQL interactive terminal.
Type: \copyright for distribution terms
\h for help with SQL commands
\? for help with psql commands
\g or terminate with semicolon to execute query
\q to quit
mya2billing=# select version();
version
--------------------------------------------------------------------------------------------------------------------------
PostgreSQL 8.1.4 on i386-redhat-linux-gnu, compiled by GCC i386-redhat-linux-gcc (GCC) 4.1.0 20060512 (Red Hat 4.1.0-17)
(1 row)
mya2billing=# SELECT "cc_logpayment.id" FROM "cc_logpayment" WHERE oid='32777';
ERROR: column "cc_logpayment.id" does not exist
mya2billing=# SELECT cc_logpayment.id FROM "cc_logpayment" WHERE oid='32777';
id
----
(0 rows)
so, I'd suggest to remove those double quotes, patch also available at
http://voip-trade.net/patch2.txt
--- trunk/A2Billing_UI/lib/Class.Table.php.orig 2006-12-03 13:19:06.000000000 +0000
+++ trunk/A2Billing_UI/lib/Class.Table.php 2006-12-03 13:19:50.000000000 +0000
@@ -198,7 +198,7 @@
$oid = $DBHandle -> Insert_ID();
if ($oid <= 0 || $oid=='') return (true);
- $sql = 'SELECT "'.$id_name.'" FROM "'.$this -> table.'" WHERE oid=\''.$oid.'\'';
+ $sql = 'SELECT '.$id_name.' FROM '.$this -> table.' WHERE oid=\''.$oid.'\'';
$res = $DBHandle -> query($sql);