Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

grouping results

Status
Not open for further replies.
Jul 28, 2005
358
FR
Hi,

I need to create a query that selects various rental properties from a table depending on certain criteria and to have them grouped according to their region.

The table I have (from another program that links to the dbase so I can't change it) has a field called regiunea where the area of town the property is in is recorded as a text entry, eg. centre or west or east etc.

Obviously I can query on a specific area in the query, but as we are looking at group bookings for multiple properties we may not have enough properties in one area to fulfill the clients needs. So, I want to group the appartments by area so that if there are enough appartments free in say the north part of town it will display them and if not it will display a part of town that does have the correct number. The client does not have any say which area the appartments are in but they do get a choice of a different area too (they are given the price difference).

I have tried to use the mysql group by statement in my select but it doesn't seem to work as I envisaged.

Can anyone shed any light on how I might achieve this?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top