Do it like any other insert, but care for special characters. In
php, you would wrap data with addSlashes() and remove them on
retrieval with stripSlashes().

But... you better not insert images into a table. Yes, you can do
it, but it is generally considered a bad idea. Read about it at
http://www.bitbybit.dk/mysqlfaq/ - if the images have to be
provided by users, use the upload functions of your system. php
for example has upload support built in.

Next you have to care for the appropriate write rights for those
files. These can be handled safely without compromising system
security. Store all data associated with the pictures in a table
except the picture itself, which should be taken care of by the
file sytem.

[EMAIL PROTECTED] schrieb am Montag, 30. Juli 2001, 11:35:42:

> hello,

> plz can someone tell me howto insert an image as blob into a table. i have
> created a table with a blob column, but i dont know how to fill it with
> binary data like pictures e.g..

> thx

> bastian


> ---------------------------------------------------------------------
> Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)

> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail <[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



-- 
Herzlich
Werner Stuerenburg            

_________________________________________________
ISIS Verlag, Teut 3, D-32683 Barntrup-Alverdissen
Tel 0(049) 5224-997 407 · Fax 0(049) 5224-997 409
http://pferdezeitung.de



---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to