At 11:19 AM -0400 9/15/99, James Manning wrote:
>[ Wednesday, September 15, 1999 ] Sean L. Gilley wrote:
>> update attachments set
>>attachment=load_file("/home/slg/mr_req.PDF") where num='811'
>>
>> ERROR 1064: You have an error in your SQL syntax near
>>'("/home/slg/mr_req.PDF") where num='811';' at line 1
>>
>> mysql> describe attachments;
>> +------------+-------------+------+-----+---------+-------+
>> | Field | Type | Null | Key | Default | Extra |
>> +------------+-------------+------+-----+---------+-------+
>> | num | int(11) | YES | | NULL | |
>> | title | varchar(50) | YES | | NULL | |
>> | attachment | blob | YES | | NULL | |
>> +------------+-------------+------+-----+---------+-------+
>> 3 rows in set (0.00 sec)
>
>Guesses:
> a) underscore in filename is wildcard and confusing (hope not :)
> b) num is int, so should be num=811 instead, not a string
> c) pdf file larger than 64k and type MEDIUMBLOB (16M) or LONGBLOB
> (4GB) needs to be used instead.
>
>I'm fascinated to find out what's up, though... certainly looks legal :)
It's legal but LOAD_FILE() was added in 3.23.0 and he's using 3.22.23b.
--
Paul DuBois, paul@stripped