Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / parsing text strings

Author
Message
Paul08
16
Years of Service
User Offline
Joined: 20th Feb 2008
Location: Oxford, UK
Posted: 26th Feb 2008 18:26
Hi.



Any reason why i shouldn't use this way of parsing a comma separated file??

I did download matrix_ libraries so i could use string_explode - but this code does that in a nice tiny little function?

*scratches head* so yeah, whats the catcH
Paul
spooky
22
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 26th Feb 2008 18:31
The command is an undocumented one but works just fine in my experience.

Be warned though that there is one major flaw in the command in that is corrupts the value you are looping through, ie your a$ will end up not as the long string you initially defined, but the first delimited value, ie 120.

Boo!
Paul08
16
Years of Service
User Offline
Joined: 20th Feb 2008
Location: Oxford, UK
Posted: 26th Feb 2008 18:42
..thats why im having problems now..

*working on a fix*
Paul08
16
Years of Service
User Offline
Joined: 20th Feb 2008
Location: Oxford, UK
Posted: 26th Feb 2008 18:48


thats quite a nice little function, i love it!
im now parsing and adding the tokens or pieces into an array.

Simple but works really well!

Login to post a reply

Server time is: 2024-11-25 07:23:39
Your offset time is: 2024-11-25 07:23:39