>> I am trying to add floating point numbers, and also plain
>> numerical values,
>>  - I have looked on mysql.com but I only seem to find stuff that
>> relate to
>> counting rows of a certain defined value - like count where something =
>> something, but I want to say "give me a numerical total value"
>> for a column
>> (that contains numerical values) where "the id" = 123456.
>>
>> Then it must count up the numerical values in that column where
>> all the id's
>> are equal to 123456 (or whatever value the id is) - I dont want to get a
>> count of the rows that relates to the id - I want the value.


You can use SUM function like this:
SELECT SUM(some_numerical_field) as how_much
FROM table_name
WHERE some_id_field=some_value



---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to