# Ajax search suggest with fulltext

**URL:** https://forum.kirupa.com/t/ajax-search-suggest-with-fulltext/241024
**Category:** Uncategorized
**Created:** [October 9, 2007, 2:16pm UTC](https://forum.kirupa.com/t/ajax-search-suggest-with-fulltext/241024 "2007-10-09T14:16:51Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![DHDesign](https://avatars.discourse-cdn.com/v4/letter/d/b19c9b/32.png) [@DHDesign](https://forum.kirupa.com/u/DHDesign)
#### Post date: [October 9, 2007, 2:16pm UTC](https://forum.kirupa.com/t/ajax-search-suggest-with-fulltext/241024/1 "2007-10-09T14:16:51Z")

</div>

i have implemented an ajax search suggest system into my application and initially the PHP that was being called by ajax said something along the lines of:

```auto

$query = mysql_query("SELECT item FROM table WHERE item like('%" . $search . "%') ORDER BY item");

```

Now that works fine for a small database, but if the db gets large, this is a poor method of searching for strings within your db…so i implemented full-text search.

the problem is that now, however, when you search for a word, the ajax suggest only kicks in AFTER you have completed the whole word, not just letter by letter (since its looking for the whole word rather than the % $search % idea.

anyone know how to get around this without sacrificing db & script performance?
