Forum Moderators: open
$query = "SELECT *, MATCH(title, article) AGAINST ('$searchString') AS score FROM tbl_articles_test WHERE MATCH(title, article) AGAINST('$searchString');
However, I need the query to run across a few tables at once, all of which have the same structure, but have been broken up for good data management due the content type. So I need the above query to check tbl_articles_test2, tbl_articles_test3 etc as part of the query.
Previously I have used UNION ALL to do things like this, but it does not seem to work with the above query? Can someone please help?
Thanks in advance.
UNION ALL
SELECT *, MATCH(title, article) AGAINST ('$searchString') AS score FROM tbl_articles_test2 WHERE MATCH(title, article) AGAINST('$searchString')
UNION ALL
SELECT *, MATCH(title, article) AGAINST ('$searchString') AS score FROM tbl_articles_test3 WHERE MATCH(title, article) AGAINST('$searchString')