Date: 06/15/02
- Next message: Jeff Bearer: "[PHP] saving a jpeg via HTTP"
- Previous message: Steve Clay: "[PHP] massive find/replace on MySQL db"
- In reply to: Steve Clay: "[PHP] massive find/replace on MySQL db"
- Next in thread: Steve Clay: "Re[2]: [PHP] massive find/replace on MySQL db"
- Reply: Steve Clay: "Re[2]: [PHP] massive find/replace on MySQL db"
- Reply: John Holmes: "RE: [PHP] massive find/replace on MySQL db"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
SC> I've inherited a MySQL db (4MB on disk) that's riddled with
SC> inconsistent storage of character entities from being pasted from
SC> Word. At very least I hope to convert all quotes "‘" - "”"
SC> to HTML's """ and "'".
For each entity you wanted to replace, you could:
update tablename set fieldwithcrap = replace(fieldwithcrap,
'oldstring', 'newstring');
Keep an eye on all your escaping and what not. And do a dump before
you do all your replacing, just in case something goes awry.
If that doesn't work well, then I'd probably dump the data, run it
through a string replacing script, and load it all back in. That
wouldn't take too long either.
- Julie
--> Julie Meloni
--> julie <email protected>
--> www.thickbook.com
Find "Sams Teach Yourself MySQL in 24 Hours" at
http://www.amazon.com/exec/obidos/ASIN/0672323494/thickbookcom-20
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
- Next message: Jeff Bearer: "[PHP] saving a jpeg via HTTP"
- Previous message: Steve Clay: "[PHP] massive find/replace on MySQL db"
- In reply to: Steve Clay: "[PHP] massive find/replace on MySQL db"
- Next in thread: Steve Clay: "Re[2]: [PHP] massive find/replace on MySQL db"
- Reply: Steve Clay: "Re[2]: [PHP] massive find/replace on MySQL db"
- Reply: John Holmes: "RE: [PHP] massive find/replace on MySQL db"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

