![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
Confirmed User
Industry Role:
Join Date: Nov 2003
Posts: 8,053
|
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
__________________
Programs that owe me money ---- Epassporte.com ~ $2700 | Protraffic.com ~ $2600 | XonDemand.com ~ $3000 Email: [email protected] |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Too lazy to set a custom title
Industry Role:
Join Date: Jul 2001
Location: Currently Incognito
Posts: 13,827
|
Replace them with: & #39 ;
__________________
![]() ![]() ![]() It's all disambiguation ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
Confirmed User
Industry Role:
Join Date: Nov 2003
Posts: 8,053
|
which sql should i run?
__________________
Programs that owe me money ---- Epassporte.com ~ $2700 | Protraffic.com ~ $2600 | XonDemand.com ~ $3000 Email: [email protected] |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
Now choke yourself!
Industry Role:
Join Date: Apr 2006
Posts: 12,085
|
update table set foo=replace(foo, 'bad', 'good');
__________________
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 |
Confirmed User
Join Date: Nov 2007
Location: Kalamazoo, MI
Posts: 2,490
|
best tip is to not use MS word ;)
__________________
-- QUOTE ME IT MAKES ME FEEL SPECIAL -- |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 |
Confirmed User
Industry Role:
Join Date: Nov 2003
Posts: 8,053
|
thats the plan but i have to replace the existing ones
__________________
Programs that owe me money ---- Epassporte.com ~ $2700 | Protraffic.com ~ $2600 | XonDemand.com ~ $3000 Email: [email protected] |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 |
In Tushy Land
Join Date: Oct 2002
Location: Nebraska
Posts: 40,149
|
Yeah, it sucks when text writers use word and then I throw it into dreamweaver and all the ' are fucked up
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#8 |
Confirmed User
Industry Role:
Join Date: Nov 2003
Posts: 8,053
|
$20 epass to whoever gives me the correct query to execute.
__________________
Programs that owe me money ---- Epassporte.com ~ $2700 | Protraffic.com ~ $2600 | XonDemand.com ~ $3000 Email: [email protected] |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#9 |
Confirmed User
Industry Role:
Join Date: May 2003
Posts: 3,765
|
give it to grouchy...
"table" = name of table "foo" = field name bad = that bad apostrophe good = good apostrophe Code:
UPDATE tablename SET fieldname = replace(fieldname, '*funky apostrophe here*', ''');
__________________
flexx [dot] aeon [at] gmail |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#10 |
Confirmed User
Industry Role:
Join Date: Nov 2003
Posts: 8,053
|
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?
__________________
Programs that owe me money ---- Epassporte.com ~ $2700 | Protraffic.com ~ $2600 | XonDemand.com ~ $3000 Email: [email protected] |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#11 |
Now choke yourself!
Industry Role:
Join Date: Apr 2006
Posts: 12,085
|
You need to escape it. '\'' or '\"'.
__________________
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#12 | |
Confirmed User
Industry Role:
Join Date: May 2003
Posts: 3,765
|
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
__________________
flexx [dot] aeon [at] gmail |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#13 |
Confirmed User
Industry Role:
Join Date: May 2003
Posts: 3,765
|
or yeah escape it like grouchy just said (duh...forgot about that)
Code:
update wp_posts set post_content = replace(post_content,'*funky*', '\'');
__________________
flexx [dot] aeon [at] gmail |
![]() |
![]() ![]() ![]() ![]() ![]() |