List:General Discussion« Previous MessageNext Message »
From:Gerald Clark Date:February 1 2002 5:32pm
Subject:Re: LOAD_FILE over SMB filesystems
View as plain text  
The single quotes around $image prevent perl from substituting the value.
You are trying to load a file named $imageFN.
$SQL = "UPDATE banners SET image=load_file(\"$imageFN\") where id=1";

Kevin Smith wrote:

>After reading some other posts on inserting a image into a blob field, I
>tried using DBI to insert and the following does not work...
>
>I've double-checked the path and it is correct.
>
>$imageFN = '/var/www/htdocs/corporate/images/homenew.jpg';
>$SQL = "UPDATE banners SET image=load_file('$imageFN') where id=1";
>
>If I execute the same SQL statement at the MySQL > prompt it inserts into
>the database fine... what am I doing wrong?
>
>Thanks,
>
>Kevin
>
>
>
>
>
>---------------------------------------------------------------------
>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 <mysql-thread98309@stripped>
>To unsubscribe, e-mail
> <mysql-unsubscribe-gerald_clark=suppliersystems.com@stripped>
>Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>
>


Thread
LOAD_FILE over SMB filesystemsEgor Egorov23 Jan
  • Re: LOAD_FILE over SMB filesystemsStephen Lee23 Jan
  • Re: LOAD_FILE over SMB filesystemsKevin Smith1 Feb
  • Re: LOAD_FILE over SMB filesystemsGerald Clark1 Feb
    • Re: LOAD_FILE over SMB filesystemsPaul DuBois1 Feb
  • Re: LOAD_FILE over SMB filesystemsKevin Smith1 Feb
  • Re: LOAD_FILE over SMB filesystemsKevin Smith1 Feb
    • Re: LOAD_FILE over SMB filesystemsPaul DuBois1 Feb
  • Re: LOAD_FILE over SMB filesystemsKevin Smith1 Feb
    • Re: LOAD_FILE over SMB filesystemsPaul DuBois1 Feb
      • [ANN] LASSO SUMMIT 2002 EUROPEJim Van Heule1 Feb
        • Re: [ANN] LASSO SUMMIT 2002 EUROPEBlue World Lasso Evangelist)1 Feb
  • Re: LOAD_FILE over SMB filesystemsGerald Clark1 Feb
  • Re: LOAD_FILE over SMB filesystemsKevin Smith1 Feb