The error means your query failed to be processed by MySQL due to some sort of syntax error (i.e., MySQL returned an error instead of a query result).
It will be easier to debug if you separate the pieces out into separate commands instead of compressing them into a one-liner.
$sql = "SELECT file FROM datadb WHERE file='".$fileurl."' LIMIT 0,1";
$result = mysql_query($sql);
if($result == false)
{
user_error(mysql_error()."<br />\n$sql");
// output some sort of error here, possibly also die()/exit()
}
if(mysql_num_rows($result) == 0)
{