Re: Treating Two Fields Like One

2005-08-24 Thread douglass_davis
David Blomstrom wrote: --- [EMAIL PROTECTED] wrote: - In my opinion: The easiest thing for you to do right now would be a table like ID (primary key) NAME PARENTID You don't need PARENT, because you have the PARENTID, you can always retrieve parent. Alth

Re: Treating Two Fields Like One

2005-08-24 Thread David Blomstrom
--- [EMAIL PROTECTED] wrote: - In my opinion: The easiest thing for you to do right now would be a table like ID (primary key) NAME PARENTID You don't need PARENT, because you have the PARENTID, you can always retrieve parent. Although... i still think it

Re: Treating Two Fields Like One

2005-08-24 Thread David Blomstrom
--- [EMAIL PROTECTED] wrote: > You have confused front end representation with > back-end data design. How > you store your data and create your data > relationships is only marginally > related to what your code makes it look like when it > presents your data > for the user. Why just create lo

Re: Treating Two Fields Like One

2005-08-24 Thread Peter Brawley
David, >I can easily substitute integers from my primary key for >names, but how do I substitute them for parents? For example: >ID | NAME | PARENT >10 | Canidae | Carnivora >11 | Canis | Canidae >12 | Vulpes |Canidae >I can easily replace Canis with 11, Vulpes with 12. >But they both hav

Re: Treating Two Fields Like One

2005-08-24 Thread SGreen
David Blomstrom <[EMAIL PROTECTED]> wrote on 08/24/2005 03:31:19 PM: > --- Peter Brawley <[EMAIL PROTECTED]> wrote: > > "As you note, the names [of animal taxons] aren't > guaranteed to be unique, or to stay the same . . . > > > One way out is to give every table an > > auto-incrementing intege

RE: Treating Two Fields Like One

2005-08-24 Thread Gordon Bruce
m/001020/celko1_1.jhtml They should help you understand your 2nd question " So I need a way to distinguish one leo from the other." -Original Message- From: David Blomstrom [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 24, 2005 2:31 PM To: mysql@lists.mysql.com Subject: Re: T

Re: Treating Two Fields Like One

2005-08-24 Thread David Blomstrom
--- Peter Brawley <[EMAIL PROTECTED]> wrote: "As you note, the names [of animal taxons] aren't guaranteed to be unique, or to stay the same . . . > One way out is to give every table an > auto-incrementing integer PK, and > use those keys, which will never change, to mark > parent-child relatio

Re: Treating Two Fields Like One

2005-08-23 Thread David Blomstrom
--- Peter Brawley <[EMAIL PROTECTED]> wrote: > David, > > >1. Some species names are shared by more than one > >mammal. For example, there's a marsupial named > >Antechinus leo. > > >2. Species are more properly cited with the name > of > >their parent (genus), so I eventually want my > spe

Re: Treating Two Fields Like One

2005-08-23 Thread David Blomstrom
I'll give that a try. Thanks. --- [EMAIL PROTECTED] wrote: > > > David Blomstrom wrote: > > >-- [EMAIL PROTECTED] wrote: > > > > > > > >>Can > >>you just concatenate > >>the two strings together after you get them from > the > >>database? e.g. > >>$parent.$name? And, just split() or explo

Re: Treating Two Fields Like One

2005-08-23 Thread douglass_davis
David Blomstrom wrote: -- [EMAIL PROTECTED] wrote: Can you just concatenate the two strings together after you get them from the database? e.g. $parent.$name? And, just split() or explode() the string when you get it from the URL? Consider the following URL's: 1. stacks/leo 2

Re: Treating Two Fields Like One

2005-08-23 Thread Peter Brawley
David, >1. Some species names are shared by more than one >mammal. For example, there's a marsupial named >Antechinus leo. >2. Species are more properly cited with the name of >their parent (genus), so I eventually want my species >URL's to look like this: As you note, the names aren't guaran

Re: Treating Two Fields Like One

2005-08-23 Thread David Blomstrom
-- [EMAIL PROTECTED] wrote: > Can > you just concatenate > the two strings together after you get them from the > database? e.g. > $parent.$name? And, just split() or explode() the > string when you get it from the URL? Consider the following URL's: 1. stacks/leo 2. stacks/Panthera_leo The

Re: Treating Two Fields Like One

2005-08-23 Thread douglass_davis
David Blomstrom wrote: <>I'm trying to make my first content management system and am wrestling with a problem that seems to be about equal parts PHP, Apache mod_rewrite and MySQL. I wondered if anyone on this list can suggest a MySQL solution - or partial solution. I'm dealing with a single

Re: Treating Two Fields Like One

2005-08-23 Thread Enrique Sanchez Vela
--- David Blomstrom <[EMAIL PROTECTED]> wrote: > I'm trying to make my first content management > system > and am wrestling with a problem that seems to be > about > equal parts PHP, Apache mod_rewrite and MySQL. I > wondered if anyone on this list can suggest a MySQL > solution - or partial sol

Treating Two Fields Like One

2005-08-23 Thread David Blomstrom
I'm trying to make my first content management system and am wrestling with a problem that seems to be about equal parts PHP, Apache mod_rewrite and MySQL. I wondered if anyone on this list can suggest a MySQL solution - or partial solution. I'm dealing with a single database table named gzanimals