473,398 Members | 2,343 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

2 or more tables with FULLTEXT index

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?

Jun 14 '07 #1
1 1446
On 14 Jun, 17:03, saavedrajj <saavedr...@gmail.comwrote:
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?
Please do NOT multi-post
Cross-post if you really think it necessary but DO NOT CROSS POST. It
wastes people's time.

Jun 14 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Phil Powell | last post by:
Relevancy scores are normally defined by a MySQL query on a table that has a fulltext index. The rules for relevancy scoring will exclude certain words due to their being too short (minimum...
0
by: Peter Engström | last post by:
Hi! I'm running MySQL 4.0.13 and have problem with fulltext search. I have a column of type 'text' which I fulltext index. I want to search for an e-mail address but I don't get any matches....
0
by: Wesley Hobbie | last post by:
------=_NextPart_000_0000_01C34DF5.B670D500 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit I am running MySQL 4.0.12 on Windows XP. I am trying to create a...
0
by: michael calwell | last post by:
Dear all, I have googled until my eyed have fallen out, and still I cannot find what I am looking for, and I would be grateful for any help at all. I can redesign my tables, create new fields...
0
by: steve | last post by:
I accept that fulltext index would be bloated due to all the atomic indexing it has to do. BUT, looking at my mysql db directory, for each table, there is a single index file consisting of all...
0
by: Alex Glass | last post by:
I have a large contacts table with about 30 columns of text fields and 5 fulltext indexes spanning the different sections of the table. I'm curious if anyone could suggest a better way to find...
1
by: Robert Oschler | last post by:
I read a while back that MySQL will only use one index per query. (If this is not so, please tell me and point me to a doc that gives a good explanation of MySQL's current index usage policy). ...
0
by: AQSAPFI | last post by:
Hi, I have a problem restoring a Read-Only filegroup in a database. I've restored the Read/Write filegroups first without any problem. Then, I am able to recover Read-Only filegroups which do...
2
by: John Kotuby | last post by:
Hi all, Maybe this belongs in the Full Text group but I am writing an ASP.NET application with a SQL Server 2005 backend, so I am posing the question here. I have been using fulltext search...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.