$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 '%' 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]."
"; } while ($row = mysql_fetch_array($counttotal)) { echo $row[id]."
"; } ?>