I'm trying to get a DataTable
containing Houses in a specific city with rooms between x and y.
I'm using this SQL query:
"SELECT * FROM Houses WHERE City = '" + Cities.Text +
"' AND Rooms BETWEEN '" + MinRooms.Text + "' AND '" + MaxRooms.Text + "'"
The controls are dropdownlists in ASP.NET.
When I remove it and leave only the "between rooms" it works.
What should I look for? Everything seems to be correct.