Welcome Guest, Not a member yet? Register   Sign In
Remove values in comma separated list from database
#3

(This post was last modified: 05-25-2017, 01:05 AM by neuron.)

You need to use regular expression to accomplish this. but as shankbad suggested it is better to change the structure of your table.

for example u can convert yout table to this:

| ID | product_name | images |
|---------------------------------------|
| 1 | Phone | img1.jpg
| 2 | Phone | img2.jpg
| 3 | Canon | img1.jpg
| 4 | Canon | img2.jpg
| 5 | Canon | img3.jpg
...
this way it will be easier to manage and write queries
Reply


Messages In This Thread



Theme © iAndrew 2016 - Forum software by © MyBB