pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Reed Loefgren <rloef@interfold.com>
To: pgsql-php@postgresql.org
Subject: Adding to multiplied values
Date: Thu, 18 May 2006 22:45:45 -0600 (MDT)
Message-ID: <20060518223103.G91432@auden.jmla.com> (raw)

All

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 
and
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?


thanks,

r



view thread (4+ messages)  latest in thread

Message-ID: <20060518223103.G91432@auden.jmla.com>
Permalink:  ../20060518223103.G91432@auden.jmla.com/
Also on:    postgresql.org/message-id/20060518223103.G91432@auden.jmla.com

 · 

reply

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: rloef@interfold.com
  Subject: Re: Adding to multiplied values
  In-Reply-To: <20060518223103.G91432@auden.jmla.com>
  References: <20060518223103.G91432@auden.jmla.com>

* 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