PDA

View Full Version : fulltext searching more than one table


faissaad1
05-06-2003, 08:46 PM
Hi all,

I'm trying to use full text searchin in tree different tables wich are not connected to each other.

these are my tables

product_table
id
name(fulltext)
description(fulltext)
picture

service_table
id
name(fulltext)
description(fulltext)
picture

News_table
id
title(fulltext)
body(fulltext)
date

what i need is to search a %searchstring% coming from a form all these (fulltext) fields and return Matchs....I have read the
www.mysql.com/doc/en/Fulltext_Search.html (http://) but they onyl explain with one table! so If anyone knows how to use with more than one table pls. lemme now. I think I should make different querys but don't even know how to compine querys.

Thanks

raf
05-06-2003, 09:59 PM
Hmm. Don't think it is possible.

Well, i presume it technically is. Say you run the search with three different selects and then have two UNION, if that's possible (or else append the results to a temporarely table).
But even then, this wouldn't be correct. Since the scores are tablespecific so you can't mingle them.

but when i look at your tables; can't you merge them into one table (with an extra variable indicating if it's a product, service or news)?