Jump to content

AutoComplete


chordsoflife

Recommended Posts

I need it to look through database records, so it would have to have SQL, which I think you can only use with PHP, so..

 

PHP/MySQL/AJAX question. I didn't know which place would be most appropriate to ask, but it has PHP in it (or so I thought) and this is the most active forum.. so here!

 

Move it necessary, though.

 

Thanks!

Link to comment
https://forums.phpfreaks.com/topic/141866-autocomplete/#findComment-742787
Share on other sites

OK, what I would do is...

 

when the user types his/her first letter search the database for everything that starts with that letter (maybe first 200) you probably would want to get the most common words first, and load it into  an array...

 

the just use  JavaScript to search that array, and if you run out of words double check the database for the next 200 words or so.. then just continue this process.

Link to comment
https://forums.phpfreaks.com/topic/141866-autocomplete/#findComment-742792
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.