I'm creating an engine to find results in several fields using MySQL, something like:
SELECT table1.*, table2.* FROM table1
JOIN table2
ON table1.id = table2.tid
WHERE
(table1.field1 LIKE 'keyword%' OR table1.field2 LIKE 'keyword%')
AND
(table2.field1 LIKE 'keyword%' OR table2.field2 LIKE 'keyword%')
ORDER BY table1.id ASC;
But now I need to know which field matches the keyword... How can I do that?
BTW, I'm using PHP.