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

Adding to multiplied values

From: Reed Loefgren <rloef(at)interfold(dot)com>
To: pgsql-php(at)postgresql(dot)org
Subject: Adding to multiplied values
Date: 2006-05-19 04:45:45
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-php

I've been hacking away on a little time billing database and I've been having
difficulty adding to a calculated amount. This is what I am trying to get 
to in an insert (for the column 'grandTotal'):

($compRate * $time) + $expenses

I've tried various combinations of quotes, double quotes, parentheses and 
what have you, but I still get errors like:

ERROR:  operator is not unique: &quot;unknown&quot; + &quot;unknown&quot 
ERROR:  invalid input syntax for type numeric: &quot;7.50 * 5&quot

I've been able to figure out hours times comp to produce a subtotal, but I 
can't seem to pull in an additional amount to produce the grand total.

What's the syntax here?




pgsql-php by date

Next:From: Volkan YAZICIDate: 2006-05-19 07:09:42
Subject: Re: Adding to multiplied values
Previous:From: Gavin M. RoyDate: 2006-05-18 03:25:08
Subject: Re: PostgreSQL function call model for PHP

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