X-Original-To: pgsql-php-postgresql.org@localhost.postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 40F3A9FA19B for ; Fri, 19 May 2006 01:43:27 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 17717-07 for ; Fri, 19 May 2006 01:43:23 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from b.mail.mho.net (b.mail.base.mho.net [64.58.4.37]) by postgresql.org (Postfix) with SMTP id B7EA89FA176 for ; Fri, 19 May 2006 01:43:22 -0300 (ADT) Received: (qmail 83609 invoked from network); 19 May 2006 04:43:16 -0000 Received: from dialup-208-157-46-208.mho.net (208.157.46.208) by b.mail.mho.net with SMTP; 19 May 2006 04:43:16 -0000 Date: Thu, 18 May 2006 22:45:45 -0600 (MDT) From: Reed Loefgren X-X-Sender: rloef@auden.jmla.com To: pgsql-php@postgresql.org Subject: Adding to multiplied values Message-ID: <20060518223103.G91432@auden.jmla.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200605/13 X-Sequence-Number: 3513 All I've been hacking away on a little time billing database and I've been having difficulty adding to a calculated amount. This is what I am trying to get to in an insert (for the column 'grandTotal'): ($compRate * $time) + $expenses I've tried various combinations of quotes, double quotes, parentheses and what have you, but I still get errors like: ERROR: operator is not unique: "unknown" + "unknown" and ERROR: invalid input syntax for type numeric: "7.50 * 5" I've been able to figure out hours times comp to produce a subtotal, but I can't seem to pull in an additional amount to produce the grand total. What's the syntax here? thanks, r