On Jul 4, 2011, at 4:27 AM, James McCluskey wrote:

> When setting up the recipes table I got the following MySql error.
> 
> #
> 
> CREATE TABLE `recipes` (
>   `id` int(11) not null auto_increment,
>   `title` varchar(240) not null,
>   `subtitle` longtext not null,
>   `ingred` longtext not null,
>   `proced` longtext not null,
>   `date` date not null default '0000-00-00',
>   `image` varchar(240) not null,
>   PRIMARY KEY (`id`),
>   KEY `ctitle` (`title`),
>   KEY `ddate` (`date`),
>   KEY `ft` (`title`,`subtitle`,`ingred`,`proced`)
> ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=2685;
> 
> The following errors were reported:BLOB/TEXT column 'subtitle' used in
> key specification without a key length
> 
> #
> 
> Can anybody suggest a solution?

        I'm not sure why the `ft` key is defined that way; I can't see any 
benefit to indexing on ingredients or procedure text. I would change subtitle 
to varchar(240) to match title, and drop the last two columns from the `ft` 
index.



-- Ed Leafe



_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: 
http://leafe.com/archives/byMID/[email protected]

Reply via email to