Hi,  I'm trying to modify the demo here
http://wiseguysonly.com/demos/scriptaculous/ajax-autocompletion/autocomplete.php
which works great but I'd like to search character by character
instead of searching for a character within the string itself.

For example, If I have these strings in a database coffee and frank
and I type fra  I just want it to list frank, not coffee.

The PHP script is below.  Do I need to modify this an option for the
new Ajax.Autcomplete();  that will do this?
Thanks!

        $sql = "SELECT title FROM autocomplete_demo WHERE title LIKE '%" .
$_POST['search'] . "%'";
        $rs = mysql_query($sql);

?>

<ul>

<? while($data = mysql_fetch_assoc($rs)) { ?>
  <li><? echo stripslashes($data['title']);?></li>
<? } ?>

</ul>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to