I have a table homes which has country,city,continent fields.
When some searches for a home , if he types for example “rom” I want to return
- Rome (30)
- Romania (120)
How can I do that?
EDIT
Use the search form here http://www.holiday-rentals.co.uk/ to see what I mean
EDIT
This is what I have tried so far
SELECT DISTINCT COUNT(country),COUNT(city),COUNT(continent) FROM homes WHERE country LIKE '%rom%' OR city LIKE '%rom%' OR continent LIKE '%rom%';
Thanks in advance
Enhancing Lieven’s answer: