List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:February 1 2002 5:37pm
Subject:Re: LOAD_FILE over SMB filesystems
View as plain text  
At 11:32 -0600 2/1/02, Gerald Clark wrote:
>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";

But the single quotes are within a double-quoted string.  So shouldn't
the substitution still occur?

Is the web server running on the same host as the MySQL server?

>
>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
>>
>
>
>
>---------------------------------------------------------------------
>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-thread98310@stripped>
>To unsubscribe, e-mail <mysql-unsubscribe-paul=snake.net@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