You appear to be violating the "repeating value" rules of relational
database.  Multivalue databases (Pick and Pick like) support this concept
but they are rather uncommon now.  You probably need to create a related
table.  Actually, you might want to do a little study on the general idea of
relational databases.  Not meaning to be negative here because nobody is
born with the knowledge.
BobJ
Mentioning MySQL to avoid being filtered.
----- Original Message -----
From: "Steve Mansfield" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, November 28, 2002 7:48 AM
Subject: adding values together


>
>
> >
> >  Hi, doeas anyone know if it's possible to add 2 or more numeric values
> >together that are in the same cell in Mysql:
> >IE: i have a cloumn called price that for any entry may contain more
> >than one value, lets say £1.00 and £2.00
> >Is there a way that i can get these values added together ?
> >I know it's easy if they are in separate rows but unfortunately they're
> >not. see the example
> >
> >id        item                price
> >1         apple              1.00
> >
> >2         apple              1.00
> >           pear                2.00
> >
> >3         banana           1.00
> >
> >I need to get the sum for price for id 2.
> >
> >
> >Regards,
> >
> >Steve Mansfield
> >Head of Development
> >[EMAIL PROTECTED]
> >
> >http://www.getreal.co.uk
> >
> >Real Data Services Ltd 117-119 Marlborough Road Romford Essex RM7 8AP
> >[Office] 0870 757 7900 [Fax] 0870 757 8900
> >
> >http://www.be-an-isp.com        http://www.isdn4free.co.uk
http://signup.getreal.co.uk
> >
> >For our email disclaimer please see the url below.
> >
> >http://www.getreal.co.uk/disclaimer.htm
> >
> >
> >
> >
> >
> >
>
>
>
> ---------------------------------------------------------------------
> 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
>


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