egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

[solved] strip slashes

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
tueb
Halfop


Joined: 04 Oct 2007
Posts: 76
Location: #quiz.de @ irc.gamesurge.net

PostPosted: Sat Dec 06, 2008 2:49 pm    Post subject: [solved] strip slashes Reply with quote

Hi,

is there a command like stripslashes for php?

I have information stored in a mysql table and need to remove the \ from the entries.


thx,

tueb


PS: addslashes would be nice, too.^^
_________________
#Quiz.de @ irc.GameSurge.net
JavaChat


Last edited by tueb on Sun Dec 07, 2008 4:34 pm; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Sun Dec 07, 2008 9:43 am    Post subject: Reply with quote

Code:
set input [string map {\\ ""} $input]

_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Sun Dec 07, 2008 11:30 am    Post subject: Reply with quote

As for addslashes, I would recommend you have a look at the mysql::escape (or mysqlescape in older versions) for proper escaping.
_________________
NML_375, idling at #eggdrop@IrcNET
Back to top
View user's profile Send private message
tueb
Halfop


Joined: 04 Oct 2007
Posts: 76
Location: #quiz.de @ irc.gamesurge.net

PostPosted: Sun Dec 07, 2008 4:27 pm    Post subject: Reply with quote

thx, both work =)
_________________
#Quiz.de @ irc.GameSurge.net
JavaChat
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber