MySQL Load_File

ivo75

Registered
Къде греша

SELECT
(@curRank := @curRank + 1) AS Rank,
id, title, LOAD_FILE ('http://site.bg/files/Image/diskketa/save.gif') as izob
FROM #__content, (SELECT @curRank := 0) r
WHERE catid =16 AND state=1
ORDER BY id DESC

опитвам се към резултата да добавя и едно изображение зареждайки го по зададен път чрез MySQL функцията LOAD_FILE
 
LOAD_FILE

Reads the file and returns the file contents as a string. To use this function, the file must be located on the server host, you must specify the full path name to the file, and you must have the FILE privilege. The file must be readable by all and its size less than max_allowed_packet bytes. If the secure_file_priv system variable is set to a nonempty directory name, the file to be loaded must be located in that directory.

If the file does not exist or cannot be read because one of the preceding conditions is not satisfied, the function returns NULL.
 
Radko каза:
LOAD_FILE

Reads the file and returns the file contents as a string. To use this function, the file must be located on the server host, you must specify the full path name to the file, and you must have the FILE privilege. The file must be readable by all and its size less than max_allowed_packet bytes. If the secure_file_priv system variable is set to a nonempty directory name, the file to be loaded must be located in that directory.

If the file does not exist or cannot be read because one of the preceding conditions is not satisfied, the function returns NULL.

Ами пътя си е верен, дал съм всички права върху файла, но пак не работи.
 
SELECT
(@curRank := @curRank + 1) AS Rank,
id, title, LOAD_FILE ('http://site.bg/files/Image/diskketa/save.gif') as izob
FROM #__content, (SELECT @curRank := 0) r
WHERE catid =16 AND state=1
ORDER BY id DESC
Премахни това в червено и пробвай пак :)
 

Back
Горе