Re: Adding to multiplied values
От | Randy Moller |
---|---|
Тема | Re: Adding to multiplied values |
Дата | |
Msg-id | 20060519134551.BED439F9AFD@postgresql.org обсуждение исходный текст |
Ответ на | Re: Adding to multiplied values (Reed Loefgren <rloef@interfold.com>) |
Список | 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@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
В списке pgsql-php по дате отправления: