Not sure if this is the best way to do this, but it seems to be the simplist up to this point. Here is the situation.
I have created a site for a commercial realty leasing firm. The database is used to list the different properties they own and include the basics like the city, the price, the size, etc...
The part that starts to get complicated is that each property has multiple suites of varying sizes. Some properties have only one size. What I ended up doing is entering each property at once, then an additional time for each suite. The size field contains individual suite size.
Of course, what happens when you specify a tight range in the suite field is you get only a single entry for any particular property. But if you enter a broad range then it lists the multiple instances in the results.
What I want to do is have the script analyze the results looking at a particular field (like the property's name) and if there are multiple instances of that identical field it will simply SKIP printing the duplicate results. Even better, if the script could somehow print something like "this property has 3 suites matching your search" by counting the duplicate results it would be better!
I know there is a way to do this. I read the step-by-step building of the baseball stats database in this forum and decided that it was just too complicated for what I needed. I'm hoping that a simple few lines of code will take care of this, but I am no CGI master and when it comes to writing code from scratch I just don't have the skills.
Thanks,
Darren
I have created a site for a commercial realty leasing firm. The database is used to list the different properties they own and include the basics like the city, the price, the size, etc...
The part that starts to get complicated is that each property has multiple suites of varying sizes. Some properties have only one size. What I ended up doing is entering each property at once, then an additional time for each suite. The size field contains individual suite size.
Of course, what happens when you specify a tight range in the suite field is you get only a single entry for any particular property. But if you enter a broad range then it lists the multiple instances in the results.
What I want to do is have the script analyze the results looking at a particular field (like the property's name) and if there are multiple instances of that identical field it will simply SKIP printing the duplicate results. Even better, if the script could somehow print something like "this property has 3 suites matching your search" by counting the duplicate results it would be better!
I know there is a way to do this. I read the step-by-step building of the baseball stats database in this forum and decided that it was just too complicated for what I needed. I'm hoping that a simple few lines of code will take care of this, but I am no CGI master and when it comes to writing code from scratch I just don't have the skills.
Thanks,
Darren