Do you have permission on the files to do that? Meaning, does the user the server is running as have permission to open the file?
Also, you need to supply a database link to your query as well. Something like:
$link = mysql_connect("host', 'user', 'pass');
$result = mysql_query($query, $link);
-- Jason