Re: [GENERAL] For the SQL gurus out there

2007-12-13 Thread Uwe C. Schroeder
Thanks everyone. This was exactly what I needed. I went with connectby as Dante recommended and it works like a charm. UC -- Open Source Solutions 4U, LLC 1618 Kelly St Phone: +1 707 568 3056 Santa Rosa, CA 95401 Cell: +1 650 302 2405 United States Fax:+1 707

Re: [GENERAL] For the SQL gurus out there

2007-12-13 Thread Alban Hertroys
On Dec 13, 2007, at 6:55, Uwe C. Schroeder wrote: What I would like to do is to create a view that sucks the comments for a given blog_id in the order they should be displayed (very commonly seen in pretty much all blogging apps), i.e. Blog comment 1 comment on comment 1 comment on com

Re: [GENERAL] For the SQL gurus out there

2007-12-13 Thread Richard Broersma Jr
--- On Wed, 12/12/07, Uwe C. Schroeder <[EMAIL PROTECTED]> wrote: > The comments table also has a field that holds a > self-reference to comment id > for commments on comments (on comments) of a blog. The model that you are referring to here is the adjacency list hierarchy model. There are

Re: [GENERAL] For the SQL gurus out there

2007-12-13 Thread D. Dante Lorenso
Uwe C. Schroeder wrote: Ok, something I've been toying around with for a while. Here's the scenario: Imagine a blogging app. I have a table for blogs with a blog_id (primary key) and a table blog_comments also with a comment_id as primary key and a foreign key holding the blog_id the post belong

[GENERAL] For the SQL gurus out there

2007-12-12 Thread Uwe C. Schroeder
Ok, something I've been toying around with for a while. Here's the scenario: Imagine a blogging app. I have a table for blogs with a blog_id (primary key) and a table blog_comments also with a comment_id as primary key and a foreign key holding the blog_id the post belongs to. The comments table