please i have a modified_by column in mysql table with string like this "40,1280825613|40,1280825617". the "40" is the id of the user that made changes to the record and "1280825613" is the date string. The | separates different periods of change.
How do i change the entire column to a readable date without affecting the user id. either mysql or php solution is welcome. Thank you so much.
I’d recommend a PHP script. You’ll need to make two columns
modified_byto retain the user id andmodifiedfor the timestamp. If there are multiplemodified_byfor each record you’ll probably want to make a separate table, i.e.revisions. This would be the best way to store the data relationship. I’d also recommend not storing formatted data. You should already see why that’s not a good idea. The database is the raw data, use PHP to format it.Once you have that setup, just:
explode()the column on|explode()the element on,Forgive me, but I’d rather teach you how to fish.