Complex search function

Recently, I had an offer to create a website for a real estate agency. However, I’ve never done such a thing before and the biggest issue in functionality I see is the interactive house search options…
Examples:,, (not english sites, but for a demo, you get the idea).

How would I go about coding such a thing? Is it just php going through and filtering a database of properties based on user preferences ?

This might be a lame question, but this is the first time I’m dealing with such a request and I have no idea what the development procedure would look like.

I would say yes it is but the filtering will be done in the query and not on the results; not being sarcastic but how else are you going to get the data?
You will have to think about the database tables; for example you do not want all the data in one table but a table for location, possibly amount of rooms and ratings etc. This should make your database smaller ( less duplication of data ) and probably speed up the search.

You could end up with some complicated queries!

Just thinking about this and you probably want to look into using AJAX for this as you can resort etc. without page reloads which you would need to do in just php.

It’s all about the data!

If you have a properly modeled backend (i.e. database), then youc an do anything on the front-end when it comes to sorting, filtering, searching, etc.

I would sit down with your client and define various data entities (e.g. property, property type, rooms, etc) and data relationships (e.g. 3 bedroom house, 2 1/2 baths, etc).

Maybe ask for help in the database forum…

1 Like

alright, thanks for the input.

That is a drastic over simplification over the process but more or less yes.

I would recommend building this on top of a CMS. That way you hopefully don’t need to worry to much about building an admin or significant programming tasks.

For PHP you could use Wordpress, Joomla, or Drupal. I would opt for Drupal 8.

1 Like

that’s exactly what I was thinking about… but is it easier to integrate into a CMS rather than having a standard website? Or is there a plugin for this by any chance.



This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.