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.

Post New Thread Reply

Register GFY Rules Calendar Mark Forums Read
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 10-17-2008, 03:46 PM   #1
zentz
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]
zentz is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-17-2008, 03:52 PM   #2
TheDoc
Too lazy to set a custom title
 
TheDoc's Avatar
 
Industry Role:
Join Date: Jul 2001
Location: Currently Incognito
Posts: 13,827
Replace them with: & #39 ;
__________________
~TheDoc - ICQ7765825
It's all disambiguation
TheDoc is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-17-2008, 03:57 PM   #3
zentz
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]
zentz is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-17-2008, 04:00 PM   #4
GrouchyAdmin
Now choke yourself!
 
GrouchyAdmin's Avatar
 
Industry Role:
Join Date: Apr 2006
Posts: 12,085
update table set foo=replace(foo, 'bad', 'good');
__________________
GrouchyAdmin is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-17-2008, 04:11 PM   #5
farkedup
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 --
farkedup is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-17-2008, 04:13 PM   #6
zentz
Confirmed User
 
Industry Role:
Join Date: Nov 2003
Posts: 8,053
Quote:
Originally Posted by farkedup View Post
best tip is to not use MS word ;)
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]
zentz is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-17-2008, 04:13 PM   #7
Sosa
In Tushy Land
 
Sosa's Avatar
 
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
Sosa is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-17-2008, 04:17 PM   #8
zentz
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]
zentz is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-17-2008, 04:31 PM   #9
FlexxAeon
Confirmed User
 
FlexxAeon's Avatar
 
Industry Role:
Join Date: May 2003
Posts: 3,765
Quote:
Originally Posted by GrouchyAdmin View Post
update table set foo=replace(foo, 'bad', 'good');
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*', ''');
something like that
__________________
flexx [dot] aeon [at] gmail
FlexxAeon is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-17-2008, 04:39 PM   #10
zentz
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]
zentz is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-17-2008, 04:44 PM   #11
GrouchyAdmin
Now choke yourself!
 
GrouchyAdmin's Avatar
 
Industry Role:
Join Date: Apr 2006
Posts: 12,085
You need to escape it. '\'' or '\"'.
__________________
GrouchyAdmin is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-17-2008, 04:45 PM   #12
FlexxAeon
Confirmed User
 
FlexxAeon's Avatar
 
Industry Role:
Join Date: May 2003
Posts: 3,765
Quote:
Originally Posted by zentz View Post
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?
bah...my bad i was trying to edit my post and my boss walked in to talk lol...

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
FlexxAeon is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-17-2008, 04:47 PM   #13
FlexxAeon
Confirmed User
 
FlexxAeon's Avatar
 
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
FlexxAeon is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks
Thread Tools



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.