Is there a way to edit the autocomplete parameter so it displays 3 or more columns instead of only 2? I'm using autocomplete for cities and I'd like to be able to display "City, Region, Country" instead of only "City, Country" because there are multiple cities with the same name in some countries.
Display more than 2 columns for Autocomplete(3 posts) (2 voices)
In MySQL you can use concat-function to combine multiple columns as one.
select concat(city, ', ', region, ', ', Country), null, id
Alternatively, the autocomplete can show region and country in separate line.
select cirty, concat(region, ', ', Country), id
Thanks! Works perfectly.
You must log in to post.