Skip site navigation (1) Skip section navigation (2)

Re: Adding to multiplied values

From: "Randy Moller" <zoomerz(at)comcast(dot)net>
To: "'Reed Loefgren'" <rloef(at)interfold(dot)com>,"'Volkan YAZICI'" <yazicivo(at)ttnet(dot)net(dot)tr>
Cc: "'PHP on postgresql list server'" <pgsql-php(at)postgresql(dot)org>
Subject: Re: Adding to multiplied values
Date: 2006-05-19 13:39:42
Message-ID: 20060519134551.BED439F9AFD@postgresql.org (view raw or flat)
Thread:
Lists: pgsql-php
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(at)postgresql(dot)org [mailto:pgsql-php-owner(at)postgresql(dot)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(at)postgresql(dot)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



In response to

pgsql-php by date

Next:From: kmh496Date: 2006-05-20 17:49:29
Subject: can somebody show me a MDB2 dsn with port number?
Previous:From: Reed LoefgrenDate: 2006-05-19 13:13:10
Subject: Re: Adding to multiplied values

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group