i have a field name url with a lot of records in it like this http://localhost/scd/app/webroot/blog/?p=26 and last value is actually id of that record so in fact the record is almost same with just last id change for whole field now i want my that field records to be changed to like this http://localhost/scd/blog/?p=26 and i want it to be done using mysql. So that only app/webroot/ can be removed from each record and remaining text remain same. can it be done.....................
If the url at the beginning is always the same, you could use this to update the entire table. UPDATE my_table SET url = CONCAT('http://localhost/scd/app/webroot/blog/',SUBSTR(url,36)); The 36 represents the length of 'http://localhost/scd/blog/' which will be removed. Test this on a few records before performing a full update to make sure it does what you want.