Kod:
$result=mysql_query("(SELECT 'news' AS tableName, id, title, date, textlead, MATCH(title, tag, textcontent) AGAINST('$s' IN BOOLEAN MODE) AS score FROM news WHERE MATCH(title, tag, textcontent) AGAINST('$s' IN BOOLEAN MODE)) UNION (SELECT 'articles' AS tableName, id, title, date, textlead, MATCH(title, tag, textcontent) AGAINST('$s' IN BOOLEAN MODE) AS score FROM articles WHERE MATCH(title, tag, textcontent) AGAINST('$s' IN BOOLEAN MODE)) ORDER BY score DESC");