Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8058491
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T09:22:23+00:00 2026-06-05T09:22:23+00:00

Working on a real estate site where a user can search for property based

  • 0

Working on a real estate site where a user can search for property based on minimum and maximum price.
Now in the database I have fields like property_price_maximum and property_price_minimum, both set to INT.

These are the two combo boxes for user to enter values.

Min       Max
5 lacs    25 lacs  
25 lacs   50 lacs 
50 lacs   70 lacs
70 lacs   1.5 Cr
1.5 Cr    5 Cr

Note: lacs = lakh and Cr = Crore. (100 lacs = 1Crore) [Added for info]

For ints i tried this:

select property_price_min,property_price_max from properties where (property_price_min between 25 and 55) and (property_price_max between 25 and 55);

Works corrrectly,but when there is a Crore value like 1.5 this fails as I have not entered the Units in the database.

When I changed the fields in database to Varchar and tried similar query with units the results were not correct(Obviously because BETWEEN compares numerals only as per my knowledge)

SELECT * from properties inner join cities on properties.city_id=cities.city_id inner join locality on properties.locality_id=locality.locality_id where (cities.city_name like '%".$citySearch."%' and locality.locality_name like '%".$localitySearch."%') and (property_price_min between '78 Lacs' and '80 Lacs');

I want to get properties where min and max price is between the users range.The problem is the UNITS over here bcoz if the user selects 25 lacs and 1.5 Cr then my query wont return correct.

I don’t think LIKE is a good option as far as numbers are concerned .
Any kind of helpful comments would be appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T09:22:25+00:00Added an answer on June 5, 2026 at 9:22 am

    You should store all your values as “lacs”. Since 100 lacs = 1 crore, you should store 1.5 crore as 150 lacs, and do all your calculations in lacs.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working in one real-estate website and I have large database around 250
Hi I am currently working on a real estate site. the users on the
Right now I am working on one Real Estate Website, In that website I
I'm using a SQL Server database, I'm working on a real estate website. I
I'm working on a real estate site and need to make notification mailer: when
I'm working on a PHP Real Estate catalog. I am working on the search
I am working on a real estate website and I am using a datalist
I am working on one real estate website which is Using RETS service to
I am working on a real estate website and i would like to write
I am working in a Corporate Real Estate CRM. Javascript is allowed but not

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.