Делаю поиск на РНР, но не получается. Вылазит ошибка
Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in
Код:
$news = mysql_query("SELECT * FROM news WHERE MATCH (name, text1, text2) AGAINST (`$search` IN BOOLEAN MODE)",$connect);
$rownews = mysql_fetch_array($news);
Структура:
CREATE TABLE IF NOT EXISTS `news` (
`id` int(6) NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL,
`cat` int(4) NOT NULL,
`rating` int(11) NOT NULL,
`img` varchar(255) NOT NULL,
`text1` text NOT NULL,
`text2` text NOT NULL,
`date` varchar(20) NOT NULL,
PRIMARY KEY (`id`),
FULLTEXT KEY `text2` (`text2`),
FULLTEXT KEY `text1` (`text1`),
FULLTEXT KEY `name` (`name`)
) ENGINE=MyISAM DEFAULT CHARSET=cp1251 AUTO_INCREMENT=17 ;