Home > Database > Mysql Tutorial > body text

Rankings with InnoDB Full-Text Search_MySQL

WBOY
Release: 2016-06-01 13:15:57
Original
914 people have browsed it

mysql>CREATETABLEarticles

    ->        idINTUNSIGNEDAUTO_INCREMENTNOT NULLPRIMARY KEY,

    ->        titleVARCHAR(200),

    ->        bodyTEXT,

    ->        FULLTEXT(title,body)

    ->        )ENGINE=InnoDB;

QueryOK,0rowsaffected

mysql>INSERTINTOarticles(title,body)VALUES('Test Article','blah blah blah'),("Matt's Noise",'this is noisy'),('February Weather','It was terrible this year.'),('Peter Pan','Tis a kids story.'),('Test1','nada'),('Database database database','foo database database database'),('Database article title','body with lots of words.'),('myfulltext database','my test fulltext database');                    

QueryOK,8rowsaffected

Records:8  Duplicates:0  Warnings:

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template