If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Unanswered: Querying Numbers from a Database

I searched the forums to no avail so if there is a previous post that covers this please let me know.

---

I am querying numbers from a database and am having a little trouble. At the moment I am able to query numbers (1, 2, 3) but when it comes to the length of numbers that's where it's not coming through (1 vs. 10 vs. 100). So when a user requests the lowest price accepted for a house (100,000) and maximum price (1,000,000) this returns everything you can think of (example: 10,000,000 and 10).

well, since we are talking about houses, the price column probably doesn't need decimal places (cents), so INTEGER will do nicely, unless you have some properties going for more than 2 billion, in which case you can use BIGINT

for number of bathrooms and similar columns, i would use TINYINT, which holds values up to 127