You are here: Re: seperator instead of a comma for listed items in DB? « PHP Programming Language « IT news, forums, messages
Re: seperator instead of a comma for listed items in DB?

Posted by news@celticbear.com on 04/17/06 19:18

Chung Leong wrote:
> news@celticbear.com wrote:
> > I'm making a recipe database, and need to have DB fields in mySQL that
> > will have lists of values that would get sent to an array to be worked
> > on.
> >
> > I anticipate that at times a comma will need to be used in the value
> > itself. So, what's a commonly used symbol or something that people tend
> > to use as a separator of a list that would then be used in the split()
> > function to send the elements into an array?
> >
> > Nearly every punctuation has a chance of being in the actual data. Any
> > suggestions?
> >
> > Thanks!
> > Liam
>
> I usually use an ASCII control character. 0x1E is designated as a
> record seperator. Don't know if MySQL would accept it or not.

Interesting.
I had to do a search on control characters and that 0x1e, because I
have no idea what they are.
(Well, except in Windows I know I can use ALT+(numpad) to write ASCII
characters, but that's beside the point.

Evidently 0x1e is shown as two carrets: ^^
When I create the full value that would go into the field, would I
simply insert ^^ between the different values before it gets sent to
mySQL, and then use ^^ as the split() seperator?
Or do I have to use that 0x1e label in some way?

Does the ^^ tell mySQL or PHP something special?
I can't seem to find anything with Google on it.

Thanks for the reply!
-Liam

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация