You are here: 2 or more tables with FULLTEXT index « PHP Programming Language « IT news, forums, messages
2 or more tables with FULLTEXT index

Posted by saavedrajj on 06/14/07 16:03

Hi everybody, I need some help. I've started to develop a search for
my PHP site, and I'm using FULLTEXT index

After all, I created the indexs in the required search fields "title"
and "text":
ALTER TABLE table1 ADD FULLTEXT(title, text);

and with the following query:
SELECT * FROM table1 WHERE MATCH(title, text) AGAINST
('$search_string');

returns me the results that I want, for the search in table1.

Until now, everything works fine.

I want to include on this search: table2 and table3, both tables have
different structure, but they have the some common fields, title and
text.

Is there any way to put in the same query, the search for a string
in 3 differents tables?

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация