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 DBF429FA3AD for ; Fri, 19 May 2006 10:46:03 -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 63283-04 for ; Fri, 19 May 2006 10:45:54 -0300 (ADT) X-Greylist: delayed 00:06:02.735902 by SQLgrey- Received: from sccrmhc11.comcast.net (sccrmhc11.comcast.net [204.127.200.81]) by postgresql.org (Postfix) with ESMTP id BED439F9AFD for ; Fri, 19 May 2006 10:45:51 -0300 (ADT) Received: from ramlap (unknown[24.2.109.170](misconfigured sender)) by comcast.net (sccrmhc11) with SMTP id <2006051913394601100k3jdce>; Fri, 19 May 2006 13:39:47 +0000 From: "Randy Moller" To: "'Reed Loefgren'" , "'Volkan YAZICI'" Cc: "'PHP on postgresql list server'" Subject: Re: Adding to multiplied values Date: Fri, 19 May 2006 07:39:42 -0600 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook, Build 11.0.5510 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869 In-Reply-To: <20060519065138.K92929@auden.jmla.com> Thread-Index: AcZ7RblkwNOo/6QqSi25HdLjt8MiTQAAt5jg Message-Id: <20060519134551.BED439F9AFD@postgresql.org> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200605/16 X-Sequence-Number: 3516 Well, can we see the code that's failing? There's nothing we can tell you about code that works.....(other than it would be a bit tidier not to do your math inside a query....) Z- -----Original Message----- From: pgsql-php-owner@postgresql.org [mailto:pgsql-php-owner@postgresql.org] On Behalf Of Reed Loefgren Sent: Friday, May 19, 2006 7:13 AM To: Volkan YAZICI Cc: PHP on postgresql list server Subject: Re: [PHP] Adding to multiplied values On Fri, 19 May 2006, Volkan YAZICI wrote: > On May 18 10:45, Reed Loefgren wrote: >> I've been hacking away on a little time billing database and I've been >> having difficulty adding to a calculated amount. > > Can we see the exact PHP code stands for the execution of related query? > > > Regards. > > Sure, and thanks. This query works, but I fail at tying in $totalExpenses to create a $grandTotal. (pine is gonna butcher this...); $query = "INSERT INTO invoices2 (idate, iperiod, inum, ijobcode, iaccount, icomp, itime, isub, create_time) VALUES('" . $invoiceDate . "', '" . $billingPeriod . "', '" . $invoiceNumber . "', '" . $jobCode . "', '" . $accountNumber . "', '" . $billingRate . "', '" . $totalHours . "', '" . $billingRate * $totalHours . "', 'now()')"; r ---------------------------(end of broadcast)--------------------------- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to majordomo@postgresql.org so that your message can get through to the mailing list cleanly -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.392 / Virus Database: 268.6.0/342 - Release Date: 5/17/2006