Making Software GPL - Was: [plug] PHP / mySQL - recursive query problem

Onno Benschop onno at itmaze.com.au
Tue Mar 30 05:03:32 WST 2004


On Tue, 2004-03-30 at 01:19, Ady Gould wrote:
> Anyone got good PHP / mySQL skills?

Yup


> I've got a problem with a recursive table definition that I am having
> hassles with and cannot get to comply (it seems it has
> anti-Assimilation technology).
>  
> The basis is storage of locations around the globe, with the ability
> to get more and more specific.

Yup

 
> AU -> WA -> Perth -> Bayswater -> XX Street
> AU -> WA -> Kalgoorlie -> YY Street
> AU -> WA -> Kalgoorlie -> YZ Street
> AU -> WA -> Kalgoorlie -> YX Street
> AU -> NSW -> Sydney -> Surry Hills -> ZZ Street
> AU -> NSW -> Sydney -> Surry Hills -> ZY Street
> AU -> WA -> Perth -> Como -> XY Street
> AU -> WA -> Perth -> XZ Street
> AU -> WA -> Perth -> XA Street
>  
> as you can see the depth varies, and there will be specific detail at
> each depth.
>  
> I have been battling using ADOdb / PHAkt (for Dreamweaver MX/MX 2004)
> with infinite loops happening :(

That would be a problem :-)


> Anyone give me a solution that shows the above list, preferably
> something like:
>  
> AU 
>   -> NSW 
>     -> Sydney 
>       -> Surry Hills 
>         -> ZZ Street
>           -> ZY Street
>  -> WA 
>    -> Kalgoorlie 
>      -> YY Street
>        -> YZ Street
>          -> YX Street
>    -> Perth 
>      -> Bayswater 
>        -> XX Street
>      -> Como 
>        -> XY Street
>      -> XZ Street
>      -> XA Street
> 
> The solution will have lots of possible uses including navigation,
> breadcrumbs and more, so it could be useful for many people.

I have written exactly that. It took me the better part of three years
to build. I'm still debating with myself if I want to make it available
as GPL.

You don't say how you store your data, but I'm guessing that it's a
simple list with a parent ID stored somewhere and you're coming unstuck
because you don't know how many children each node has.

As I said, I worked on this for a while, I have a solution, clients are
using it, and it all uses one query to give you the list.

I don't mean to be a schmuck and leave you hanging there, but I'm a
little weary giving over my solution...

So, let me ask the list for reading material that will assist me in
making my choice. I'm in favour of making it available, but I also need
to pay the rent.



Onno Benschop 

Connected via Optus B3 at S38°01'05" - E145°25'10" (Upper Beaconsfield, VIC)
-- 
()/)/)()        ..ASCII for Onno.. 
|>>?            ..EBCDIC for Onno.. 
--- -. -. ---   ..Morse for Onno.. 

Proudly supported by Skipper Trucks, Highway1, Concept AV, Sony Central, Dalcon
ITmaze - ABN: 56 178 057 063 - ph: 04 1219 8888 - onno at itmaze dot com dot au




More information about the plug mailing list