You need to read up on relational databases then.

In this instance you would need:

1 table for product data (productID + product)
1 table for payments containing amount | date | productID

You can then have many payment records relating to one product record.
This is a one-to-many relationship.

HTH
d

-----Original Message-----
From: James Buckingham [mailto:[EMAIL PROTECTED] 
Sent: 15 January 2004 12:53
To: '[EMAIL PROTECTED]'
Subject: RE: [ cf-dev ] NEWBIE - Dividing a string by a particular
charact er

Sorry in reply to the DB question. The previous web development company
built the DB like this and the client is now using this in their systems
so
I'm pretty much stuck with it. 

I'm guessing it's been built like this because there is different prices
and
dates for one product so rather than inserting the same product
information
over and over again they've crammed the dates and fares into one record.

Another area I need to learn about though :)

-----Original Message-----
From: James Buckingham [mailto:[EMAIL PROTECTED] 
Sent: 15 January 2004 12:48
To: '[EMAIL PROTECTED]'
Subject: RE: [ cf-dev ] NEWBIE - Dividing a string by a particular
charact
er

Great thanks a lot guys for the answer and quick reply. I'll give it a
shot
just now.

Cheers again,
James

-----Original Message-----
From: Robertson-Ravo, Neil (RX)
[mailto:[EMAIL PROTECTED]
Sent: 15 January 2004 12:32
To: '[EMAIL PROTECTED]'
Subject: RE: [ cf-dev ] NEWBIE - Dividing a string by a particular
charact
er

Any List type function will server you well here...

<cfset myList = "�562.50�562.50�587.50�562.50�445.00">

<cfdump var="#ListGetAt(myList,3,"�")#">

[for example]




 

-----Original Message-----
From: James Buckingham [mailto:[EMAIL PROTECTED]
Sent: 15 January 2004 12:35
To: '[EMAIL PROTECTED]'
Subject: [ cf-dev ] NEWBIE - Dividing a string by a particular character

Hi there,
 
I'm currently working on my very first Cold Fusion project and I've hit
a
bit of a stumbling block; so I was wondering if any of you veterans out
there could help me out :). I'm sure this is very simple!!!
 
I have a field in my DB called fares which contains a single string in
each
of the records. The string looks something like this:
 
�562.50�562.50�587.50�562.50�445.00
 
Each fare is to correspond with a date which is stored in exactly the
same
way. I've managed to split the date up ok as this is a set number of 8
characters but the prices could vary a lot so I'm needing to split it up
by
the � character. I've been looking at the left,mid and right functions
but
I've not managed to find anything on how to implement it in this
particular
way. Can anyone point me in the right direction?
 
Cheers in advance,
JamesB
This e-mail is from Reed Exhibitions (Oriel House, 26 The Quadrant,
Richmond, Surrey, TW9 1DL, United Kingdom), a division of Reed Business,
Registered in England, Number 678540.  It contains information which is
confidential and may also be privileged.  It is for the exclusive use of
the
intended recipient(s).  If you are not the intended recipient(s) please
note
that any form of distribution, copying or use of this communication or
the
information in it is strictly prohibited and may be unlawful.  If you
have
received this communication in error please return it to the sender or
call
our switchboard on +44 (0) 20 89107910.  The opinions expressed within
this
communication are not necessarily those expressed by Reed Exhibitions.
Visit our website at http://www.reedexpo.com

--
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] For
human
help, e-mail: [EMAIL PROTECTED]

--
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] For
human
help, e-mail: [EMAIL PROTECTED]

-- 
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]


--
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]

Reply via email to