Raised This Month: $ Target: $400
 0% 

Question about DBI and single-quote delimeter


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Mugwump
Senior Member
Join Date: May 2004
Old 09-05-2004 , 13:52   Question about DBI and single-quote delimeter
Reply With Quote #1

Since character fields are generally delimeted by single quotes, if i want to insert a character string like player name that may contain a single-quote or use a WHERE clause and do a comparison against a sting that might contain a single-quote how would I escape the single quote in that string variable?

In perl this is easy,

Code:
$name =~ s/'/\\'/g;
but I am not so sure how to do this in small.

Thanks
Mug
Mugwump is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 17:27.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode