Hi, I've been looking for a solution to searching across multiple tables using a full text search to do a site wide search. ie say I have the following tables:
news_posts
- id
- title
- content
gallery_images
- id
- title
- image_url
I want to be able to search the title field for both tables and display the matches from both tables.
So far all I have come across is to do the full text search on both the tables and insert the results into a table which stores the score, table name and id and then query that table but it does seem a little long winded and surely won't be efficient enough with lots of data.
Appreciate it if someone could help. Thanks
news_posts
- id
- title
- content
gallery_images
- id
- title
- image_url
I want to be able to search the title field for both tables and display the matches from both tables.
So far all I have come across is to do the full text search on both the tables and insert the results into a table which stores the score, table name and id and then query that table but it does seem a little long winded and surely won't be efficient enough with lots of data.
Appreciate it if someone could help. Thanks