i use a regexp to slash-out single quotes for
inclusion into an SQL query:

// quote a value to make it appropriate for inclusion in an SQL string
function db_quote($value) {
  return ereg_replace("'","\\'",$value);
}



> -----Original Message-----
> From: Mitchell Hagerty [mailto:[EMAIL PROTECTED]]
> Sent: Friday, February 23, 2001 18:54
> To: [EMAIL PROTECTED]
> Subject: [PHP] special characters with perl,mysql,php
> 
> 
> Hey All,
> 
> What would be a good method for inserting data into a blob field
> that contained special characters using perl then retrieving that
> data with php?
> 
> URI::Escape has worked well with perl but now that php has
> gotten into the picture I need a new method.
> 
> any suggestions?
> 
> tks
> mitch
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to