Book Image

Sphinx Search Beginner's Guide

By : Abbas Ali
Book Image

Sphinx Search Beginner's Guide

By: Abbas Ali

Overview of this book

Table of Contents (15 chapters)
Sphinx Search
Credits
About the Author
Acknowledgement
About the Reviewers
www.PacktPub.com
Preface

Time for action - normal search in MySQL


  1. 1. Open phpMyAdmin in your browser and create a new database called myblog.

  2. 2. Select the myblog database:

  3. 3. Create a table by executing the following query:

    CREATE TABLE `posts` (
    `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
    `title` VARCHAR( 255 ) NOT NULL ,
    `description` TEXT NOT NULL ,
    `created` DATETIME NOT NULL ,
    `modified` DATETIME NOT NULL
    ) ENGINE = MYISAM;
    

    Note

    Queries can be executed from the SQL page in phpMyAdmin. You can find the link to that page in the top menu.

  4. 4. Populate the table with some records:

    INSERT INTO `posts`(`id`, `title`, `description`, `created`, `modified`) VALUES
    (1, 'PHP scripting language', 'PHP is a web scripting language originally created by Rasmus Lerdorf', NOW(), NOW()),
    (2, 'Programming Languages', 'There are many languages available to cater any kind of programming need', NOW(), NOW()),
    (3, 'My Life', 'This post is about my life which in a sense is beautiful', NOW(), NOW()),
    (4, 'Life on Mars', 'Is there any...