Very much a noob here...please bear with me!
I have a MySQL table that has a particular column that contains data that "looks" like CSV data.
Example:
We'll say that the column name is "class"
record 1 - 1,3,5,2,8,10
record 2 - 6,4,8,10,2,1
I need to read through each record (I know how to do this...) read each field value into a string (can do this...)
Here is my challenge:
Once I have the data read into a string value I need to be able to "remove" a given value from the string and write it back.
In other words, let's assume I want to remove "1":
Data would become:
record 1 - 3,5,2,8,10
record 2 - 6,4,8,10,2
Note that any of the field values could have a "1" *and* a "10". Simply looking for the "1"s in a string search isn't going to cut it. I am assuming the data needs to be pulled into an array and do some comparing...but my brain is "losing it" here...no clue how to proceed! Can someone point me in a direction?