Storing a linked list

2007-06-19 Thread Matt Juszczak
Hi all, I've got a table such as the following: id1 char id2 char sample data looks like this: id1 id2 1 3 2 4 3 5 5 6 6 8 And of course another table has something like: id info1 info2 info3 1 blahblahblah 2 blahblah

Re: Storing a linked list

2007-06-19 Thread Mogens Melander
How about: $id1 = 1; $id2 = 0; while ($id1) /** or ($id2 != 8) **/ { $sql = select * from table where id1=$id1; $row=query($sql); $id1=$row-id1; $id2=$row-id2; do_stuff(); $id1 = $id2 } On Tue, June 19, 2007 10:58, Matt Juszczak wrote: Hi

Re: Storing a linked list

2007-06-19 Thread Peter Brawley
Matt I'd like to store paths to specific destinations... See -- Tropashko's 'materialized modell' eg http://www.dbazine.com/oracle/or-articles/tropashko4 -- the airports example at http://www.artfulsoftware.com/mysqlbook/sampler/mysqled1ch20.html PB - Matt Juszczak wrote: Hi all,

Re: Storing a linked list

2007-06-19 Thread Baron Schwartz
Celko also discusses them in SQL For Smarties. Baron Peter Brawley wrote: Matt I'd like to store paths to specific destinations... See -- Tropashko's 'materialized modell' eg http://www.dbazine.com/oracle/or-articles/tropashko4 -- the airports example at