All pastes #562717 Raw Edit

Unnamed

public text v1 · immutable
#562717 ·published 2007-06-12 21:43 UTC
rendered paste body
$handle = fopen('termlist.txt', "r");
if ($handle) {
   while (!feof($handle)) {
       $lines[] = fgets($handle, 4096);
   }
   fclose($handle);
}
   

  $query = "SELECT name, caption, author, id, format, image, price, code,
               MATCH(name, caption, author, id, format, image, price, code) 
               AGAINST ('$lines') AS score FROM product_yahoo 
               WHERE MATCH(name, caption, author, id, format, image, price, code) 
               AGAINST ('$lines') AND name NOT LIKE 'author profile:%' AND caption NOT LIKE '<!--nosearch-->%' 
			   AND name NOT LIKE '$%' AND id NOT LIKE '%direct' 
			   AND name NOT LIKE 'Please Wait%'";

$counttotal = mysql_query($query) or die(mysql_error());
if ($counttotal > 0) {
	echo $lines[100]."<br>";
}
while ($row = mysql_fetch_array($counttotal)) {
	echo $row[id]."<br>";
}

?>