We'll be using PHP, but right now, i'm just learning MySQL through the 
terminal client.

I don't think strings would do the trick here... There will be alot of 
data, so it might get messy in a short time. It also seems like a slow 
way of doing it. We might need to change the item ids in the future, and 
it would be messy to look through long strings for the id...

Thanks.

On Wednesday, November 28, 2001, at 03:17  PM, Darren S Ball wrote:

> what language are you using?
> depending on what environment you are in, there are several ways to do 
> this.
> and order table with the format userid, productid could be used...
> but if you are using perl or php you could concatenate the product id 
> into a
> string something
> like id1:id2:id3:id4....etc...
> and in perl you could use split, in php you could use explode on the
> specific character type to get the info into an array - then manipulate 
> it
> from there...
>
> if it is a small amount of info, I would use the split/eplode type of
> thing...
>
> i don't know exactly.  but there is always the concept of normalization,
> seperate everything...
>
> -----Original Message-----
> From: Chris Comeau [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, November 28, 2001 3:07 PM
> To: [EMAIL PROTECTED]
> Subject: Dynamic arrays in table?
>
>
> I'm new to MySQL and i'm having some trouble with creating a table with
> the format i need.
>
> I need to create a table for user information (name, email, phone) and a
> list of purchased items (IDs) that will grow or shrink with time, in
> some kind of dynamic array.
>
> Is it possible to have this in one table, or would the purchased items
> need to go in a seperate table, for each user? I haven't used indexes
> yet, could those be usefull in this case?


--------------------
Chris Comeau
[EMAIL PROTECTED]


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