|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2008-01-16 23:09 UTC] scottmac@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Dec 05 14:00:02 2025 UTC |
Description: ------------ It doesn't matter if a $file variable contains valid file name or just a string of no sense, in both cases mysql_query() returns 'true'. When the valid file name is being used the load is successful. Reproduce code: --------------- mysql_query("INSERT INTO ssert(id, file) VALUES(NULL, '')", $link); $id = mysql_insert_id($link); $file = "/no/such/file"; if(mysql_query("UPDATE ssert SET file=LOAD_FILE('$file') WHERE id=$id", $link)) { echo 'Success'; } else { echo 'False'; } Expected result: ---------------- Expected 'False' on file not loaded into the database since /no/such/file does not exist. Actual result: -------------- mysql_query("UPDATE ssert SET file=LOAD_FILE('$file') WHERE id=$id", $link) returns true although the file does not exist.