Clive Galway wrote:
> I have a demo of the latest version up now !
> See your lovely query in action :)
>
>
http://free-host.no-ip.org/clive
Good to hear it. I glanced over it quickly, and I'll check it out in full later on today.
>
> I made your query a subquery on the locations
> table like:
Ok, BTW, i commented the query in full in your wiki page
> the children of the selected region, I just use
> the parent_id of the region (Is it bad to have an
> adjacency list parent_id AND nested set lft, rgt
> fields ?)
I don't know if it's bad. I've had some thoughts on this myself. Check out the post of
Wednesday, August 24, 2005 on my blog
http://rpbouman.blogspot.com
> I have another question...
> How would I modify that query to add an extra
> field on the end of the returned data that
> included a COUNT of all locations in that region
> (the table xmb_gm_locations has a region_id field
> in it)
> Ideally the field should contain the number of
> locations in that region and it's child regions.
> (ie for the row UK, it should contain a count of
> all locations with a region id that is a child of
> UK, not just in the UK region itself)
>
> I tried solving this one for like 5 or 6 hours,
> fried my brain and gave up :(
Not to worry. I'll look into it tonight when I get home from work. Others: feel free to contribute, I'm making long workdays lately ;-).