There are 3 tables with same field names in a product inventory database. Each table is for a different category. If I am searching for a keyword through all tables, is there a way to identify as to which table the resulting data belong?
My query is:
$query = "select id, prod_name, prod_num, description from category1, category2, category3 where (prod_name LIKE '%$keyword%') || (description LIKE '%$keyword%')";
Is there a better query to obtain the desired outcome?