| 
			
			 
			
				08-07-2009, 01:16 AM
			
			
			
		 | 
	| 
		
			| the fake one |  |  |  
			| 
					Join Date: Mar 2003 Location: San Francisco 
						Posts: 10,718
					 |  | | 
	str.escape()Quote: 
	
		| 
					Originally Posted by xXziroXx  I've ran into this problem again. 
string.escape(), does - as stated - add another ' infront of ', instead of a backslash.
 
SQL refuses to accept '', so we really need a command to escape ' with a backslash. Funny enough, I found this:
escapestring(str) - returns string - adds \ in front of ", ' and \, and removes non-printable characters 
... which is a lie, or doesn't work. That too escapes ' with a '   |   has been working fine for us. | 
 | 
|  |