![]() |
How do I convert the Microsoft Word apostrophe to an HTML friendly apostrophe?
how do i convert ms word apostrophes to html friendly apostrophes in my WP and other mysql databases?
thank you |
Replace them with: & #39 ;
|
which sql should i run?
|
update table set foo=replace(foo, 'bad', 'good');
|
best tip is to not use MS word ;)
|
Quote:
|
Yeah, it sucks when text writers use word and then I throw it into dreamweaver and all the ' are fucked up
|
$20 epass to whoever gives me the correct query to execute.
|
Quote:
"table" = name of table "foo" = field name bad = that bad apostrophe good = good apostrophe Code:
UPDATE tablename SET fieldname = replace(fieldname, '*funky apostrophe here*', '''); |
i tried this
update wp_posts set post_content = replace(post_content,'''', ''') as funky apostrophe is showing as '' in mysql. the error i get is: ERROR: Unclosed quote @ 62 STR: ' SQL: update wp_posts set post_content = replace(post_content,'''', ''') when i try to replace it with something else then ''' , example 'fuck' it works fine. any ideas? |
You need to escape it. '\'' or '\"'.
|
Quote:
dont use an actual apostrophe, use & #39 with space removed between & and 3 the funky apostrophe should carry over ok though if you copy/paste it directly from Word |
or yeah escape it like grouchy just said (duh...forgot about that)
Code:
update wp_posts set post_content = replace(post_content,'*funky*', '\''); |
All times are GMT -7. The time now is 12:28 AM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123