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.