Closed (fixed)
Project:
Table Manager
Version:
5.x-1.4
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
26 Jan 2009 at 00:25 UTC
Updated:
5 Feb 2009 at 09:25 UTC
I have three ten column tables, in all the tables in the I want to replace "March" with "January - March". As I have about 3000 rows, manually editting is not feasible. I therefore tried the following in PhpMyAdmin
UPDATE `drupal_tablemanager_data` SET `data` = replace(data, "March", "January - March")
or
UPDATE `drupal_tablemanager_data` SET `data` = replace(data, 'March', 'January - March')
or
UPDATE `drupal_tablemanager_data` SET `data` = replace(data, '"March"', '"January - March"')
All of which mess up the formatting of the table - any suggestions to help me?
Thanks
Comments
Comment #1
pobster commentedYes, use php serialize to insert data manually into the database, you only have to look at the module code to see an example.
Problem you're having is likely due to the way serialize 'measures' the length of the string in an array, hence if you're changing the string you also need to change the numeric length. Eg. i:6:iphone -> 6 character length
Pobster