Re: Array help needed :-(
| From: | David Robley | Date: | Tue, 08 Oct 2002 04:49:22 +0000 |
| Subject: | Re: Array help needed :-( | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-22271@lists.php.net to get a copy of this message | ||
In article <000801c26e10$a2128510$f7fea8c0@chris>, chris@planetoxygene.com
says...
> Hi there everyone,
>
> I have a problem i'm trying to figure out but i'm not too good with arrays, just know
> the basics, if anyone could help me out on this it would be wonderful :-)
>
> I have two sets of data in columns of a MySQL DB, these items are size and price.
>
> Size is seperate by comma's in the first column, and I have it split into a dropdown box
> no problem to read (For example):
>
> small
> medium
> large
>
> but then I have a price field, which contains 1.99,2.99,3.99 etc ..... what I need to do is
> when someone selects an item from the dropdown - say small as an example, it would know how to get
> 1.99 from the price entry in the DB. I guess what I need to do is somehow associate each entry in
> the price field with those in the size, but I have no idea how to do it :-(
>
> Any help would be really appreciated as this stumps the hell out of me.
>
> Thanks
>
> Chris
I think you may have a problem with your database design? Can you explain
a little more exactly what it is you are trying to do and perhaps someone
can advise on how your data might best be structured.
--
David Robley
Temporary Kiwi!
Quod subigo farinam