I have a database table that looks a bit like this:
1|+Word +Matching -Goodbye|/url-1
SELECT id, words, url,
MATCH ("Hello I am matching a word") AGAINST (words IN BOOLEAN MODE) AS relevance
ORDER BY relevance DESC
The documentation is pretty clear:
The search string must be a string value that is constant during query evaluation. This rules out, for example, a table column because that can differ for each row.
Hence, you cannot do what you want with a query.
You can use dynamic SQL. Or a loop in PHP to loop through the patterns in your table.