var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: How to split string with delimiter ?
can someone guide me how can i split the string with delimiter ?
ie : budget, hotel, Test
how can i use "," as delimiter so that the query can return me with 3 separate string like
result : budget
Thank you !
since you weren't very clear on what you're doing and why, i shall give you the answer without any sort of example of usage --
use the SUBSTRING_INDEX function
pulling the first word is easy, pulling the last word is easy (using -1 as the count), and pulling any of the words in between will require nested invocations
the purpose of doing so is to get count on the frequency of similar words to create tag cloud.
can you please enlighten me on how i can use neted invocation, are you imply using while loop and using following condition as filter
1.Scan character by character to check if there have any ","
2.if "," found then substring
3.if no "," found, then return the only word
if the above condition make sense, how can i scan character by character to find "," ?
thank you !
okay, now that i see what you're doing, i realize that it isn't going to be 3 words all the time, is it
you should do this entire process (analysis of words) outside of mysql
for one thing, this will give you much better power over which words to ignore
save each good word in a separate table, with a link to the article that the word is found in
it doesn't fix it with lenght of 3 words, i just need to find a way how i can get a word from a string like that
When i extract one word, i will do a insertion to a temporary table and keep repeat until all string are parse.
then only i start count on the frequency.
my first challenge here is to find out how i can scan each "," in a whole string.
thank you !
like i said, do ~not~ attempt to do this with mysql