GetDotted Domains

Viewing Thread:
"Recursion again"

The "Freeola Customer Forum" forum, which includes Retro Game Reviews, has been archived and is now read-only. You cannot post here or create a new thread or review on this forum.

Thu 22/09/05 at 17:00
Regular
"NULL"
Posts: 1,384
I've got MySQL database with a table that details information about particular villas. One of that fields in that table is `areaid`.

The structure works as follows:

Continent
Country
Region
Area

I have 4 tables - one each for the 4 levels of location above.

Now if someone searches for a villa in a given area, easy - a simple query to find the matching records.

My question is, if someone specifies, say, a region but no area, what's the best way of finding the results? Use a JOIN query to pull the region ID into each row of the villas table? Or is there a more efficient way to do it?
Fri 23/09/05 at 14:35
Regular
"NULL"
Posts: 1,384
OK, I've got it all sorted now.

Next question...

If somebody wants to pick an area, I want it to only show areas for a the chosen region, and only show the regions for the chosen country, and only show countries for the chosen continent.

I want it to be a series of dropdown boxes that are dynamically filled with values once the previous box has been chosen.

Now on some sites, these work by having a JavaScript array with all the data in, and some refresh the page. I'm thinking a page refresh would be a good idea, since potentially there will be a lot of values.

Unfortunately, I'm not that good with JavaScript - but I am prepared to learn. I've Googled a bit, and had a look at a few sites, but I'm struggling to find any help on the page refresh method. Before I dissect a web page to find out how they do it, can they please give me some links, or general tips.

Cheers.

EDIT: OK, that was much easier than I expected - I guessed and it worked!

Thu 22/09/05 at 17:00
Regular
"NULL"
Posts: 1,384
I've got MySQL database with a table that details information about particular villas. One of that fields in that table is `areaid`.

The structure works as follows:

Continent
Country
Region
Area

I have 4 tables - one each for the 4 levels of location above.

Now if someone searches for a villa in a given area, easy - a simple query to find the matching records.

My question is, if someone specifies, say, a region but no area, what's the best way of finding the results? Use a JOIN query to pull the region ID into each row of the villas table? Or is there a more efficient way to do it?

Freeola & GetDotted are rated 5 Stars

Check out some of our customer reviews below:

Many thanks!
You were 100% right - great support!
Continue this excellent work...
Brilliant! As usual the careful and intuitive production that Freeola puts into everything it sets out to do, I am delighted.

View More Reviews

Need some help? Give us a call on 01376 55 60 60

Go to Support Centre
Feedback Close Feedback

It appears you are using an old browser, as such, some parts of the Freeola and Getdotted site will not work as intended. Using the latest version of your browser, or another browser such as Google Chrome, Mozilla Firefox, or Opera will provide a better, safer browsing experience for you.