MySql explode cell value

Is there a way to explode a cell value within a mysql statement

for example

("SELECT * FROM image_files WHERE details = 'Explode("-",details')Return array[2]'")

Hope that kinda makes sense. I want to explode the value in column details at the "-" and get the third value sent in the array as it would if using the php explode feature.

Who is Participating?

Improve company productivity with a Business Account.Sign Up

cmaohioConnect With a Mentor Senior Systems ManagerCommented:
the only other thing I can think of is through an elaborate use of the substring() or even substring_index()
cmaohioSenior Systems ManagerCommented:
MySQL doesn't have an explode function so you cannot do this. You will have to pull the data out of the database with one query, get the value through exploding the data, then do another query.
wal_toorAuthor Commented:
Ahh substring_index() did the trick for me. Thankz
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.