Hello friends..
i want to make a fulltext search page.As far as i know i must do something lke this
CREATE TABLE articles (
id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY,
title VARCHAR(200),
body TEXT,
FULLTEXT (title,body)
);
the question is if i can make something like
CREATE TABLE `gallery_fool` (
`photo_id` bigint(20) unsigned NOT NULL auto_increment,
`photo_filename` varchar(25) default NULL,
`photo_caption` text,
`photo_category` varchar(20) NOT NULL default '',
`Gerne` varchar(20) NOT NULL default '',
`First` varchar(30) NOT NULL default '',
`Last` varchar(30) NOT NULL default '',
`elm1` text NOT NULL,
`photo_category1` varchar(5) NOT NULL default '',
`date_submited` timestamp(14) NOT NULL,
`enddate` timestamp(14) NOT NULL,
FULLTEXT1 (First,Last),
FULLTEXT2 (photo_category1,elm1),
PRIMARY KEY (`photo_id`),
KEY `photo_id` (`photo_id`)
) TYPE=MyISAM AUTO_INCREMENT=1 ;
but i get SQL error
i want to create more than 1 fooltext field in the same table
FULLTEXT1 (First,Last), FULLTEXT2 (photo_category1,elm1),
cause i want later to use this fields(FULLTEXT1 & FULLTEXT2)
to make a selection in a list/menu for search options
mysql> SELECT * FROM articles
WHERE MATCH (FULLTEXT1 or FULLTEXT2) AGAINST ('keyword');
I hoppe you understand what i want to do🙂
Questions:
1) How can i do this?
2) If i cant what i must do to achieve the same result?