mysql - PHP Explode method in sql query -


I have a problem here

query there sql and after that Create a group? In fact, I want to use a function such as php explosion in a SQL query, is there a way to do this?

test {explode} test2 {explode} test2 {explode} test3 {explode} test {blast} test

returns:

  test 'count3' test2 'count2` test3' count1`   

here is a sqlfiddle:

You can create your own function and then use it in the query

Here is an example of the Federico cargo lagoon

  Construction work SPLIT_STR (X VARCHAR (255), Delim VARCHAR (12), Status INT) Returns on VARCHAR (255) Location of return (SUBSTRING) (SUBSTRING_INDEX (x, delim, pause), lens (SUBSTRING_INDEX (X, DELIM, PG-1)) + 1), DELIM, ''); For example (`field_name`, ',', 0)   from the test group for  
  SELECT SPLIT_STR (` field_name`, ',', 0) SPLIT_STR  

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -