From: Randy Moller <zoomerz@comcast.net>
To: 'Reed Loefgren' <rloef@interfold.com>
To: 'Volkan YAZICI' <yazicivo@ttnet.net.tr>
Cc: 'PHP on postgresql list server' <pgsql-php@postgresql.org>
Subject: Re: Adding to multiplied values
Date: Fri, 19 May 2006 07:39:42 -0600
Message-ID: <20060519134551.BED439F9AFD@postgresql.org> (raw)
In-Reply-To: <20060519065138.K92929@auden.jmla.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-php@postgresql.org
Cc: zoomerz@comcast.net, rloef@interfold.com, yazicivo@ttnet.net.tr
Subject: Re: Adding to multiplied values
In-Reply-To: <20060519134551.BED439F9AFD@postgresql.org>
References: <20060519065138.K92929@auden.jmla.com> <20060519134551.BED439F9AFD@postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox