# MySQL FullText Search?

**URL:** https://forum.kirupa.com/t/mysql-fulltext-search/223113
**Category:** programming
**Created:** [April 19, 2007, 4:28pm UTC](https://forum.kirupa.com/t/mysql-fulltext-search/223113 "2007-04-19T16:28:25Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![duncanhall](https://avatars.discourse-cdn.com/v4/letter/d/ad7895/32.png) [@duncanhall](https://forum.kirupa.com/u/duncanhall)
#### Post date: [April 19, 2007, 4:28pm UTC](https://forum.kirupa.com/t/mysql-fulltext-search/223113/1 "2007-04-19T16:28:25Z")

</div>

I’m trying to develop a search feature using MySQL’s ‘Full-Text’ searching capabilities.

I have a table set up, with 5 columns:

**student\_id** - int  
**course\_id** - int  
**first\_name** - text  
**last\_name** - text  
**description** - text

phpMyAdmin is showing that I have a primary index set up, as well as a “FULLTEXT” index set up for the fields “first\_name”, “last\_name” and “description”.

However, when I try and perform a simple search such as:

```php

<?php
require_once("connection.php");

$query = "SELECT * FROM `students` WHERE MATCH(`first_name`, `last_name`, `description`) AGAINST ('natalie')";

$result = mysql_query($query);

if($r = mysql_fetch_array($result)) {    
    while($r = mysql_fetch_array($result)) {
        extract ($r);
        echo $r['first_name'] . "<br />";
        echo $r['last_name'] . "<br />";
        echo $r['student_id'] . "<br />";
    }
} else {
    echo mysql_error();
}
?>

```

I only recieve one result. It is a correct result, but I know there is more than one match for this search.

Can anybody help?
