|
Posted by ZeldorBlat on 07/16/07 00:47
On Jul 15, 8:41 pm, Jerry Stuckle <jstuck...@attglobal.net> wrote:
> rebecca...@gmail.com wrote:
>
> > Hello, could someone please show me how to do this.
>
> > In a single cell in a DB column, I can have multiple kinds of data
> > squeezed together delimited by a comma.
>
> > like .....
> > "datagreen,datablue,dataorange,datawhite,datayellow,datared,datablue, ...
> > "
>
> > If I read that data and have it in a string like $datastring...... how
> > do I put it into a array situation? to access that data.... so if I
> > want to know what is in spot 5 only, and return back 'datayellow' for
> > instance, how do I do that? :-) I don't know if array is the right
> > word, I just want to be able to access any part of that string based
> > on the order it is in.
>
> > Thank you!
>
> > Rebecca
>
> Rebecca,
>
> Try this in comp.databases.mysql - a MySQL newsgroup.
>
> But before you do, google for "database normalization". MySQL has a
> decent discussion on it, but some other sites may be better.
>
> --
> ==================
> Remove the "x" from my email address
> Jerry Stuckle
> JDS Computer Training Corp.
> jstuck...@attglobal.net
> ==================
Jerry is right -- you should fix your database first.
Having said that, have a look at the explode() function in PHP -- it
will take a delimited string and turn it into an array.
<http://www.php.net/explode>
Navigation:
[Reply to this message]
|