I am using a join request:
SELECT snippet_id, title FROM tbl_snippets WHERE title LIKE ?
UNION
SELECT tag_id, tag FROM tbl_tags WHERE tag LIKE ?
UNION
SELECT category_id, category FROM tbl_categories WHERE category LIKE ?
How to find out which table the result came from? snippet_id, tag_id and category_id do not have a prefix, such as SN, TG or CI, which I could use to determine where the result came from. The results are basically combined into a single result, so I really don't know if what I think is why I asked here is possible.
source
share