Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Pulling out information for MySQL

by mfriedman (Monk)
on Jul 19, 2002 at 17:54 UTC ( #183337=note: print w/replies, xml ) Need Help??


in reply to Pulling out information for MySQL

If you're storing your information in a MySQL database, why are you using characters to seperate the levels? That's not very good normalization. Instead, I would create each record with a field that references the primary key of its parent. Top-level categories could have 0 as the parent. Then you could select all the records where the parent is zero in order to get your top level categories.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://183337]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2021-06-18 01:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What does the "s" stand for in "perls"? (Whence perls)












    Results (86 votes). Check out past polls.

    Notices?