Okay, now try the following...
First create the following table in the same database as the PhpDig tables:
Code:
CREATE TABLE blanks2 (
blank TEXT DEFAULT '' NOT NULL
);
Then in search_function.php find:
Code:
$timer->stop('reorder results');
And beforehand add the following:
Code:
if (is_array($final_result) && count($final_result) > 0) {
arsort($final_result);
reset($final_result);
while (list($spider_id,$weight) = each($final_result)) {
$content_file = $relative_script_path.'/'.TEXT_CONTENT_PATH.$spider_id.'.txt';
if (!is_file($content_file)) {
mysql_query("INSERT INTO blanks2 (blank) VALUES ($spider_id)",$id_connect);
if (isset($final_result[$spider_id])) { unset($final_result[$spider_id]); }
}
}
}
Again do some searches, and then attach to this thread about ten rows from the blanks2 table so I can have a look-see. Note that searches might take longer.
Also note that this may seem like it removes the blanks, but it's a temporary thing. I'll need to see if any rows get inserted into blanks2 to put things back in sync.