ahh.. yes i see where you are coming from.. yes i suppose that would work.
what i'm trying to do is have one table for a member base, and have each member capable of having a list of items of a varying number. when i first thought about doing this i thought there may have been a field type that would act as a linked list.. kinda like a set, but you can add or delete items. but yes i guess your idea will work.. i take it listid is what would link each list to its member. come to think of it, it doesn't even need to be linked sequentially for what i'm doing and i could even just replace the nxt and prev fields with a timestamp. will this be efficient when i get into having large numbers of records? i guess this is just a database development mentality issue.. it's my first project of this kind. thanks dan ----- Original Message ----- From: "Joseph Jude" <[EMAIL PROTECTED]> To: "Daniel Jarrett" <[EMAIL PROTECTED]> Sent: Friday, March 29, 2002 8:01 PM Subject: Re: [newbie post] linked lists.. > i didn't understand you. > it is going to depend on what complexity you are going to put into the list > create table linkedlist( > listid int, > prvlinkid int, > item varchar(20) > nextlinkid int) > > > insert into linkedlist(1,0,'first item',2); > insert into linkedlist(2,1,'second item',3); > insert into linkedlist(3,2,'third item',0); > > here you have the list. item will be what you want to store. It could be a > text field that you store here itself. Or it could be a id to a foreign > table which have the elements that you want. > > if you say, the purpose of the list, may be that will help > > > > ----- Original Message ----- > From: "Daniel Jarrett" <[EMAIL PROTECTED]> > To: "Joseph Jude" <[EMAIL PROTECTED]> > Cc: <[EMAIL PROTECTED]> > Sent: Friday, March 29, 2002 9:57 AM > Subject: Re: [newbie post] linked lists.. > > > > i think i'm getting in over my head a bit here.. > > is this something thats gonna be simple to do? > > > > > > > > ----- Original Message ----- > > From: "Joseph Jude" <[EMAIL PROTECTED]> > > To: "Daniel Jarrett" <[EMAIL PROTECTED]> > > Cc: <[EMAIL PROTECTED]> > > Sent: Friday, March 29, 2002 7:34 PM > > Subject: Re: [newbie post] linked lists.. > > > > > > > Hi Daniel, > > > I can think of a table with columns like this: > > > > > > prvlink > > > item > > > nextlink > > > > > > where prvlink and nextlink points to the previous and next nodes and > item > > is > > > the current node. > > > prvlink = 0 for first node > > > nextlink = 0 for last node > > > > > > Hope this helps > > > Joseph > > > > > > > > > > > > ----- Original Message ----- > > > From: "Daniel Jarrett" <[EMAIL PROTECTED]> > > > To: <[EMAIL PROTECTED]> > > > Sent: Friday, March 29, 2002 9:19 AM > > > Subject: [newbie post] linked lists.. > > > > > > > > > > is there any way of doing a linked list in mysql.. > > > > ? > > > > > > > > the only alternative i've got is to have a table with a fixed number > of > > > > columns liike this > > > > item1 > > > > item2 > > > > item3 > > > > item4...etc > > > > > > > > is this the only way to do what i'm trying to do. > > > > does anyone get what i'm on about? > > > > > > > > cheers > > > > dan > > > > > > > > > > > > --------------------------------------------------------------------- > > > > Before posting, please check: > > > > http://www.mysql.com/manual.php (the manual) > > > > http://lists.mysql.com/ (the list archive) > > > > > > > > To request this thread, e-mail <[EMAIL PROTECTED]> > > > > To unsubscribe, e-mail > > > <[EMAIL PROTECTED]> > > > > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php > > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > Before posting, please check: > > > http://www.mysql.com/manual.php (the manual) > > > http://lists.mysql.com/ (the list archive) > > > > > > To request this thread, e-mail <[EMAIL PROTECTED]> > > > To unsubscribe, e-mail > > <[EMAIL PROTECTED]> > > > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php > > > > > > > > --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php