Am new to this type of sql query…how to write the SQL query to search three table for result. Am trying to implement a search feature where the keyword/text enter by the user can search three different table for result and if the keyword/text entered by the user do not match any text in this three tables no match found should be return.
I want to search like…
table_1
SELECT * FROM business WHERE
business_name LIKE :business_name
OR business_title LIKE :business_title
OR business_description LIKE :business_description
table_2
SELECT * FROM products WHERE
product_name LIKE :product_name
OR product_description LIKE :product_description
table_3
SELECT * FROM personal WHERE first_name LIKE :first_name
OR last_name LIKE :last_name
OR personal_description LIKE :personal_description
If the keyword/text entered by the user match any text in one of the table or all three tables the whole result should be return as the result…
Thanks