results from full text help

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

User avatar
C_Calav
Forum Contributor
Posts: 395
Joined: Wed Jun 02, 2004 10:55 pm
Location: New Zealand

Post by C_Calav »

here is the error i am gettoing in mySQL
Error
SQL-query:

SELECT P_Name,
MATCH (

P_Name, P_Desc
)
AGAINST (
'army'
)
FROM planes
LIMIT 0 , 30
MySQL said:

#1191 - Can't find FULLTEXT index matching the column list
anyone help me out?

its only when i search with both feilds, singly they work fine
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

I still think the table needs to be created with both as a single full text index:

FULLTEXT( P_Name, P_Desc )

or whatever it is..
User avatar
C_Calav
Forum Contributor
Posts: 395
Joined: Wed Jun 02, 2004 10:55 pm
Location: New Zealand

Post by C_Calav »

thanx feyd,

how am i going to create the table again when i have lots of info already init?

cheers
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

total guess on this one; use phpMyAdmin to remove the fulltext marks on each, then add them back in at the same time.. this may have phpMyAdmin "fix" it..

you may need to make an ALTER TABLE call with the change..

last chance is to export the table's contents, drop it and recreate the table with both..
User avatar
JAM
DevNet Resident
Posts: 2101
Joined: Fri Aug 08, 2003 6:53 pm
Location: Sweden
Contact:

Post by JAM »

Code: Select all

CHANGE COLUMN field field longtext;
What I do in one project where I need (sigh) to change a varchar to text field and keep content.
User avatar
C_Calav
Forum Contributor
Posts: 395
Joined: Wed Jun 02, 2004 10:55 pm
Location: New Zealand

Post by C_Calav »

ok,

i re created the table with fulltext on from the create stage and i got the same error, took one of the fulltext off and it worked.

then i added the fulltext back on to the second feild and gave me the same error.

anyone ran into problems or know how to do a search on two feilds on your table?

thanx
Post Reply