Hi all,
I am still pretty new to PHP, but I was chatting to a friend the other
day and he put some thoughts into my head about how tables are laid out
and processed.
At the moment I have three tables: Topic, Message, Comment. A topic has
messages and each message can have comments. I have set this up with a
table each and a field for the id of the parent (e.g. a comment will
have the id of the message that it refers to).
My mate said to me that I should really put all of this in one big table
with a parent and child field. He said that my code should then figure
out what is the child of what and how it is displayed.
I have two questions about this:
1. First, is this idea of using one big table with parent/child
fields better than my seperate table approach?
2. Secondly, how would I write the logic for the single table approach.
Any help or advice or links to documentation would be great.
Cheers,
Jono
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
- Re: [PHP] Recursion with database tables Jono Bacon
- Re: [PHP] Recursion with database tables Ernest E Vogelsinger
- Re: [PHP] Recursion with database tables Jono Bacon
- Re: [PHP] Recursion with database tables David Otton
- Re: [PHP] Recursion with database ta... Jono Bacon
- Re: [PHP] Recursion with databa... David Otton
- Re: [PHP] Recursion with databa... Ernest E Vogelsinger
- Re: [PHP] Recursion with database tables Ernest E Vogelsinger
- Re: [PHP] Recursion with database tables Jono Bacon
- Re: [PHP] Recursion with database tables rblack