View Single Post
Old 08-03-2005, 07:30 AM   #6
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
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.
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension.
Charter is offline   Reply With Quote