0
In my db I have a column called Range_ids
, I do an ID insertion using the function serialize
. These Ids look like an array, the problem is how I can make one DELETE
of the specific ID within the column.
//Usando a função serialize eu insiro esses ids 1052,1053..... em serie
+------------+----------+--------------------------------------------+
| id | nome | Range_ids |
+------------+----------+--------------------------------------------+
| 01 | Prod1 | a:2:{i:1052;s:4:"1052";i:1053;s:4:"1053";} |
| 02 | Prod2 | a:2:{i:1052;s:4:"1052";i:1053;s:4:"1053";} |
| 03 | Prod3 | a:2:{i:1052;s:4:"1052";i:1053;s:4:"1053";} |
+------------+----------+--------------------------------------------+
The problem is how I delete a specific ID on the specific line.
Example: I want to remove the number 1052 from the column range_id
on line 1
//Precisaria de Algo assim
<a href="del.php?id_range=1052">Deletar</a>
Hello friend from what I understood in this script Voce made an unserialize that was to separate the 1052 array plus what I wanted to do the procedure to delete only this 1052 something DELETE FROM.....
– Fabio Henrique
After separating the array 1052, you must make a UPDATE with the new value, so that the value of the first line is modified.
– Edilson