Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
kris f #1
Help doing maths
Hi
I have a database that has amongst others the fields "Price" and "Quantity".
What i need to do is multiply the "Price" by the "Quantity" for each record
and then add them all up to give a "Subtotal"
I think i am way of track with as the result is nowhere near correct
<cfquery name="GetSubtotal" datasource="#Application.dsn#">
SELECT (SUM(Price)) * (SUM(Quantity)) as Subtotal
FROM ProductsOrdered
</cfquery>
Then outputed in the page as
<cfoutput>#GetSubtotal.Subtotal#</cfoutput>
:( Thanks in advance
kris f Guest
-
#39534 [NEW]: Error in maths to calculate of ZEND_MM_ALIGNED_MIN_HEADER_SIZE
From: wharmby at uk dot ibm dot com Operating system: Windows XP PHP version: 5CVS-2006-11-16 (snap) PHP Bug Type: Scripting... -
Help on a maths game
Im trying to make a soccer game involving maths where there is a maths equation eg 2+2= and if they get the right answer they score a goal if they... -
maths for translate
does anyone know the real maths behind the 3d translate. I want to take a point in a 3d world then set its rotation in xyz, then finally move... -
calculating positions around a sphere/maths
Hi, This is a follow up to a problem I posted in the 3D forum, I ve put it here so I can add an attachment. Basically the problem is how to... -
maths question - whats a cosh
whats is a cosh and how do you work it out in maths using cosines and sines thanks - got to rush HAIRYBOBBY - why didn't I choose a really... -
Mr Black #2
Re: Help doing maths
SELECT SUM(Price * Quantity) as Subtotal FROM ProductsOrdered WHERE . .if needed. . GROUP BY . . . if needed . . .
Mr Black Guest
-



Reply With Quote

