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 7AB509FA372 for ; Fri, 19 May 2006 10:10:52 -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 58068-04 for ; Fri, 19 May 2006 10:10:44 -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 CF8829F9AFD for ; Fri, 19 May 2006 10:10:44 -0300 (ADT) Received: (qmail 54351 invoked from network); 19 May 2006 13:10:42 -0000 Received: from dialup-208-157-46-176.mho.net (208.157.46.176) by b.mail.mho.net with SMTP; 19 May 2006 13:10:42 -0000 Date: Fri, 19 May 2006 07:13:10 -0600 (MDT) From: Reed Loefgren X-X-Sender: rloef@auden.jmla.com To: Volkan YAZICI cc: PHP on postgresql list server Subject: Re: Adding to multiplied values In-Reply-To: <20060519070942.GA215@alamut> Message-ID: <20060519065138.K92929@auden.jmla.com> References: <20060518223103.G91432@auden.jmla.com> <20060519070942.GA215@alamut> 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/15 X-Sequence-Number: 3515 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