Re: Multiple Image inserts into a MySQL BLOB column

2003-10-21 Thread gerald_clark
Make sure that the mysql server has read permission for the file.

Zafar wrote:

Hello

Having trouble inserting images into a BLOB column. No problems doing 
this 'one at a time' via
a third party MySQL GUI Manager, but I need to create an indexed table 
containing some
1K + images. Using the recommeded method from the MySQL manaual ie.

UPDATE tbl_name
SET blob_column=LOAD_FILE("/tmp/picture")
WHERE id=1;   
only sets the blob field to NULL (0 bytes) ! - even where an image is 
stored perfectly well.
There has to a SAFE METHOD of doing these image inserts from within a 
'while' 'for' or some other loop statement in a shell script or perl 
routine. Appreciate enlighenment on this topic from
someone who has been down this road and figured it out.

Rgds, ZCH





--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: Multiple Image inserts into a MySQL BLOB column

2003-10-20 Thread colbey

Checkout http://php.dreamwerx.net/forums/viewtopic.php?t=6
For a PHP example you could easily convert to PERL or just install PHP
standalone binary on the box.



On Fri, 3 Oct 2003, Zafar wrote:

> Hello
>
> Having trouble inserting images into a BLOB column. No problems doing
> this 'one at a time' via
> a third party MySQL GUI Manager, but I need to create an indexed table
> containing some
> 1K + images. Using the recommeded method from the MySQL manaual ie.
>
> UPDATE tbl_name
> SET blob_column=LOAD_FILE("/tmp/picture")
> WHERE id=1;
>
> only sets the blob field to NULL (0 bytes) ! - even where an image is
> stored perfectly well.
> There has to a SAFE METHOD of doing these image inserts from within a
> 'while' 'for' or some other loop statement in a shell script or perl
> routine. Appreciate enlighenment on this topic from
> someone who has been down this road and figured it out.
>
> Rgds, ZCH
>
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
>

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Multiple Image inserts into a MySQL BLOB column

2003-10-20 Thread Zafar
Hello

Having trouble inserting images into a BLOB column. No problems doing 
this 'one at a time' via
a third party MySQL GUI Manager, but I need to create an indexed table 
containing some
1K + images. Using the recommeded method from the MySQL manaual ie.

UPDATE tbl_name
SET blob_column=LOAD_FILE("/tmp/picture")
WHERE id=1;

only sets the blob field to NULL (0 bytes) ! - even where an image is 
stored perfectly well.
There has to a SAFE METHOD of doing these image inserts from within a 
'while' 'for' or some other loop statement in a shell script or perl 
routine. Appreciate enlighenment on this topic from
someone who has been down this road and figured it out.

Rgds, ZCH



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]