List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:March 11 2003 3:44pm
Subject:Re: Is mysql_real_escape_string for blob storage?
View as plain text  
At 23:05 +0000 3/11/03, Lai Liu-yuan wrote:
>Hi, everyone.
>
>I use blob to store image data in mysql. I use mysql_real_query to 
>store it, but did not use mysql_real_escape_string to process it 
>before hand.
>
>Then I saw in the document that this is needed. But I am testing the 
>data stored by reading them out to do some processing, there seems 
>no segmentation fault happened.
>
>By the way, when I stored the image, I stored the width and height 
>also into the database. I read the image out for processing alsa 
>based on these two variables. So if the image data is truncated due 
>to special characters, there should be segmentation fault, shouldn't 
>it?
>
>So, back to the question, is mysql_real_escape_string needed when 
>storing blob data?

It's needed for *all* values, except those you're absolutely certain
contain no special characters.

Thread
Is mysql_real_escape_string for blob storage?Lai Liu-yuan11 Mar
  • Re: Is mysql_real_escape_string for blob storage?Paul DuBois11 Mar
    • Re: Is mysql_real_escape_string for blob storage?Lai Liu-yuan11 Mar
      • Re: Is mysql_real_escape_string for blob storage?Paul DuBois11 Mar