You are here: Re: MySQL WHERE MATCH problem « PHP Programming Language « IT news, forums, messages
Re: MySQL WHERE MATCH problem

Posted by Mike Willbanks on 05/16/05 05:04

Maziar,

> I have the following table
>
> CREATE TABLE `fulltext_sample` (
> `copy` text,
> FULLTEXT KEY `copy` (`copy`)
> ) ENGINE=MyISAM DEFAULT CHARSET=latin1;

First you should always use an id field now...

If you look at the mysql manual for fulltext
(http://dev.mysql.com/doc/mysql/en/fulltext-search.html) the correct
way to create the table would be:
CREATE TABLE fulltext_sample (
id id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY,
copy TEXT,
FULLTEXT (copy)
);

What you pretty much did wrong at the top was trying to create a key. I
do not know exactly how mysql parses that but you may want to try over
with an ID column and the column for a copy.

Mike

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация