Problem with Fulltext Indexes in MySQL – The used table type doesn’t support FULLTEXT indexes

I got few days ago problem in MySQL :
The used table type doesn’t support FULLTEXT indexes

I had problem with Yet Another Related plugin for WordPress and I was getting “No related posts” for every post.
I tried to manually install MySQL code :

database prefix:

ALTER TABLE wp_posts ADD FULLTEXT `yarpp_title` ( `post_title`)

ALTER TABLE wp_posts ADD FULLTEXT `yarpp_content` ( `post_content`)

CREATE TABLE IF NOT EXISTS `wp_yarpp_keyword_cache` (
`ID` bigint(20) unsigned NOT NULL default ’0′,
`body` text collate utf8_unicode_ci NOT NULL,
`title` text collate utf8_unicode_ci NOT NULL,
`date` timestamp NOT NULL default CURRENT_TIMESTAMP,
PRIMARY KEY (`ID`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
COMMENT=’YARPP”s keyword cache table’;

CREATE TABLE IF NOT EXISTS `wp_yarpp_related_cache` (
`reference_ID` bigint(20) unsigned NOT NULL default ’0′,
`ID` bigint(20) unsigned NOT NULL default ’0′,
`score` float unsigned NOT NULL default ’0′,
`date` timestamp NOT NULL default CURRENT_TIMESTAMP,
PRIMARY KEY (`reference_ID`,`ID`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

And I didn’t success.
Where was the trick ?

You need to use :
ALTER TABLE wp_posts ENGINE = MYISAM;

Enjoy and use YARP !!!

SQL DELETE – SQL tutorial

In case, we have to delete some kind of record from a certain table then we use a command known as DELETE FROM. The basic structure for this purpose is given below;

DELETE FROM "table_name"
WHERE {condition}

For example;

 Store_Information
store_name  Sales   Date
Boston  $1550   Mar-05-2011
San Diego   $350    Mar-07-2011
Los Angeles $400    Mar-08-2011
Los Angeles $800    Mar-08-2011

We do not want to use the data related to Boston. For this purpose, we will use the following syntax;

DELETE FROM Store_Information
WHERE store_name = "Boston"

The output of the table will look like this;

Store_Information
store_name  Sales   Date
San Diego   $350    Mar-07-2011
Los Angeles $400    Mar-08-2011
Los Angeles $800    Mar-08-2011

SQL UPDATE – SQL tutorial

When we create a table, we find it necessary to make changes in it again and again. For this purpose, a command UPDATE is used. The basic structure for this function is given here;

UPDATE "table_name"
SET "column_1" = [new value]
WHERE {condition}

We are going to use a table for better explanation;

 Store_Information
store_name  Sales   Date
Boston  $1550   Mar-05-2011
San Diego   $350    Mar-07-2011
Los Angeles $400    Mar-08-2011
Los Angeles $800    Mar-08-2011

Here, we have seen that Boston has $1550 sales on 05Mar/2011 but the correct sale is $1750. So, we have to make modification in the table;

UPDATE Store_Information
SET Sales =1750
WHERE store_name = "Boston"
AND Date = "Mar-05-2011”

The out put will be like this;

Store_Information
store_name  Sales   Date
Boston  $1750   Mar-05-2011
San Diego   $350    Mar-07-2011
Los Angeles $400    Mar-08-2011
Los Angeles $800    Mar-08-2011

Only one row is changed due to the command WHERE. In case, we have more than one row and all of them suit the condition then all the rows will be changed. On the other hand, if there is no clause of WHERE then all the rows will get changed.
W can change numerous columns on the spot. For this purpose, the structure will be like this;

UPDATE "table_name"
SET column_1 = [value1], column_2 = [value2]
WHERE {condition}

SQL INSERT INTO – SQL tutorial

We can utilize two different ways for entering data in a given table of SQL. First, we can put data in a row; the second is to put many rows at the same moment.
Put into Values
The basic structure for putting values in single row of the table is given here;

INSERT INTO "table_name" ("column2", "column3", ...)
VALUES ("value2", "value3", ...)

For example, we have the following data;

 Store_Information
Column Name Data Type
store_name  char(51)
Sales   float
Date    datetime

We have to add one more row for the data related to Boston on March 08, 2011. The sale of that day is $700.

INSERT INTO Store_Information (store_name, Sales, Date)
VALUES ('Boston', 700, 'Mar-08-2011')

Put into Pick:
We can put many rows in a table by using the other INSERT INTO command. By using a statement SELECT, we can choose data which we have to put in the table. Here, we can use data of any other table for insertion. The structure for this purpose is given below;

INSERT INTO "table1" ("column2", "column3", ...)
SELECT "column4", "column5", ...
FROM "table2"

The above syntax is in trouble-free way. But we can us GROUP BY, HAVING and WHERE clauses.
In case, we have 2 tables. One is Store information and the other is Sales information.

INSERT INTO Store_Information (name, Date, Sales)
SELECT name, Date, Sales
FROM Sales_Information
WHERE Year(Date) = 2010

The SQL syntax is used here. Diverse databases have changed syntax for the same purpose.

SQL USE – SQL tutorial

If we have to choose data from MYSQL then we will use a keyword ‘USE’ for this purpose. The basic structure is given below;

USE "Database Name"

In case, we have to make connection to database named as ‘Record’. Then the process will be like this;

USE Record;

It is possible to get admittance to many tables from different database. For this purpose, we have to mention the name of database and the name of that table. In case, the database is in current use then it is not necessary to give the name of that database.
For instance, if we have to open the table “Lesson_111” from our database”Record” and table”Teachers” from our database “Staff”, then the syntax will be like this;

USE Record;
SELECT ...
FROM Lesson_111, Staff.Teachers  
WHERE ...
;

SQL TRUNCATE TABLE - SQL tutorial

If we want to delete all the data present in a table then we will use command TRUNCATE TABLE. This command will do no harm to the table; it will only delete the data from it. The basic structure for this command is given here;

TRUNCATE TABLE "table_name"

If we have to truncate a table in SQL, named as purchaser then the process will be like this;

TRUNCATE TABLE customer