Is there a way to setup autocomplete in PHP/jQuery that can quickly run through thousands of rows in a database?
I have a job board where the user enters his/her college - and I want to offer autocomplete. Problem is, there are 4,500 colleges in the united states and a seems like an awful solution.
Is there a good way to both make the query fast, and return results only when there are less than 10 options available?
Thank you in advance, Walker
I agree with Anax. You may want to look at a simple solution like the new jQuery UI Autocomplete field.
Using the delay and minLength options, you could keep the script from querying the server until the user has entered say three characters, which would reduce the number of results.
PS. There is also a caching option which may be useful. You could cache the entire list client-side lessening the calls to the database.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With