On Nov 11, 4:45 pm, alohaaaron <[EMAIL PROTECTED]> wrote:
...
> I also can't get the results to show by just the first letter. Say if
> the list contains coffee and frank, I type f and just want frank to be
> found, not coffee. But it shows both frank and coffee. Here is the
> link
>
> here is the php lookup
>
> $sql = "SELECT UNIQUE_CUST_ID FROM test2 WHERE UNIQUE_CUST_ID LIKE
> '%" . $_POST['search'] . "%'";
> $rs = mysql_query($sql);
> ?>
That's because you're telling it in the SQL to match any string
containing (not just starting with) the search string.
Change
'%" . $_POST['search'] . "%'";
to
'" . $_POST['search'] . "%'";
Colin
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---