Helpful Information
 
 
Category: Database Management
Searching

I am using the following query to search two tables on contain titles for text and second contains text. both have id as common column and I need result after searching both tilte and text.
Look at this query.

select * from topics LEFT JOIN topic_text ON topics.topic_id=topic_text.topic_id
where (topics.topic_title LIKE '%Re:%') OR (topic_text.text LIKE '%Re:%')
I do get the right result but i know this is wrong way to query a database. Do some one know a btter way to search twotable for a single thing let me know.










privacy (GDPR)