Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Thu Mar 28, 2024 7:50 pm
VoIP Billing solution


All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: problem adding payment on PostgreSQL-8.1
PostPosted: Sun Dec 03, 2006 1:23 pm 
Offline

Joined: Sun Dec 03, 2006 10:40 am
Posts: 10
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);


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 04, 2006 12:51 am 
Offline

Joined: Sun Mar 12, 2006 2:49 pm
Posts: 954
Location: Barcelona
It's weird I put a double quote there... You are definitely right.
Thanks, Areski


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 
Voice Broadcast System


All times are UTC


Who is online

Users browsing this forum: No registered users and 9 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group