ok, as I told you in the previous message, you should check if the $result is a valid result identifier (obviously it isn't).
I think your query is wrong... are you aware that you're asking for the cartesian product of all of the records from one of the tables, and all of the records from the other where the field filename meets the condition?? I mean, you are not specifing any relation between both tables (like a join or something). I don't think that's what you want.
anyway, try the code this way:
$query = "SELECT * FROM 'benjobee_graffiti','benjobee_skatepics' WHERE filename='$action'";
$result = mysql_query($query);
//There was an error??
if (!$result)
printf("<h1>%s</h1>", mysql_error();
else
{
//No errors??? let's check how many rows did we get
printf("</h1>Query returned %d rows.</h1>", mysql_num_rows());
}
this will give you a hint of what's going on with your query.