Hello guys, I'm in need of some thinking help.

I want to build an auto-complete text input to find cars, but I want it to search for Car Models and Car Manufactor too.

In example, if the user type 'For', the suggestions would be
'Ford - Car 1'
'Ford - Car 2'
'Some car that start with 'For''

If the user type 'H', the seggestions would be
'Honda - Civic'
'Hatch - Some hatch car'
'Some car that start with 'H''

In the database, there's 3 tables, Car, CarModel and CarManufactor. The Car table has the fields CarModelId and CarManufactorId, that are reference two the other tables.

I thoght in two options till now:
1. Search each field in each table and then join them toggether
2. Pre fill a table with all possibilites and them search only there using RegEx to make the best match.

Does anyone have better ideas or suggestions?

Thanks very much!

Recommended Answers

All 3 Replies

As far as I am aware of, you can use jQuery to pull this off. I know that the jQuery website has something for that.

Michael, thanks for the response.
That's exatcly what I was planning to use, but my doubt is on the server side. How to perform the best match between the tree tables.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.