Re: Recursive queries

2007-07-09 Thread Baron Schwartz
Hi, Steffan A. Cline wrote: I am trying to set up a forum where there are main posts with replies and replies to replies. Rather than using nested queries in my middleware I am thinking there has to be some kind of recursive query where I can output the results in a format like so: MAIN

Re: Recursive queries

2007-07-09 Thread David T. Ashley
On 7/8/07, Steffan A. Cline [EMAIL PROTECTED] wrote: I am trying to set up a forum where there are main posts with replies and replies to replies. Rather than using nested queries in my middleware I am thinking there has to be some kind of recursive query where I can output the results in a

Recursive queries

2007-07-08 Thread Steffan A. Cline
I am trying to set up a forum where there are main posts with replies and replies to replies. Rather than using nested queries in my middleware I am thinking there has to be some kind of recursive query where I can output the results in a format like so: MAIN Reply to main reply to

Re: recursive queries

2005-12-09 Thread Gleb Paharenko
this, but just wondered if there are any functions in MySQL that make this easier, or specific functions available to stored procedures. I have read the manual and couldn't find anything, but thought I would ask. I notice that the new MS SQL Server has support for recursive queries

Re: recursive queries

2005-12-09 Thread Eric Bergen
and couldn't find anything, but thought I would ask. I notice that the new MS SQL Server has support for recursive queries and oracle also, so I thought maybe... Thanks -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http

recursive queries

2005-12-08 Thread Duncan Miller
Title: DIY MTB Is there any built in or other support for recursive queries . I suspect not, but wonder what is considered the best approach. With stored procedures being supported in 5.0 is that the way to handle these. Thanks -- Duncan Miller [EMAIL PROTECTED] www.diymtb.com.au

Re: recursive queries

2005-12-08 Thread SGreen
Duncan Miller [EMAIL PROTECTED] wrote on 12/08/2005 06:40:55 AM: Is there any built in or other support for recursive queries . I suspect not, but wonder what is considered the best approach. With stored procedures being supported in 5.0 is that the way to handle these. Thanks

Re: recursive queries

2005-12-08 Thread Duncan Miller
anything, but thought I would ask. I notice that the new MS SQL Server has support for recursive queries and oracle also, so I thought maybe... Thanks

Recursive queries

2005-05-13 Thread Marcus Bointon
I have a table that represents a tree structure via a self-join. I'd like to get hold of all parent records in a single query - is such a thing possible? e.g. given idparentid 10 21 32 42 51 64 If I was starting with record 4, I would want it to return records 2

Re: Recursive queries

2005-05-13 Thread mfatene
Hi, in oracle we have connect by prior for hierachical data traversal. in mysql, you can use group_concat like this : mysql select parentid, group_concat(id) from ids - group by parentid; +--+--+ | parentid | group_concat(id) | +--+--+ |

Re: Recursive queries

2005-05-13 Thread Marcus Bointon
On 13 May 2005, at 10:02, [EMAIL PROTECTED] wrote: if you use php, you can look at http://www.sitepoint.com/article/hierarchical-data-database That's just what i needed, great article. Thanks, Marcus -- Marcus Bointon Synchromedia Limited: Putting you in the picture [EMAIL PROTECTED] |

Re: Recursive queries

2005-05-13 Thread John Doe
Am Freitag, 13. Mai 2005 10.32 schrieb Marcus Bointon: I have a table that represents a tree structure via a self-join. I'd like to get hold of all parent records in a single query - is such a thing possible? e.g. given idparentid 10 21 32 42 51 64 There is

Recursive queries

2001-03-05 Thread Isaac Force
Quick searches of Google and the MySQL page didn't turn up anything, so I'll ask here.. Here's what I have: I have a table that among others, have fields called 'section_id' and 'parent_id'. The section_id is the id of the "self" section, and the parent_id is the id of the section that "owns"

RE: Recursive queries

2001-03-05 Thread Johnny Withers
Equipment, to Golf to Golf Equipment.. hope this helps.. - Johnny Withers [EMAIL PROTECTED] p. 601.853.0211 c. 601.954.9133 -Original Message- From: Isaac Force [mailto:[EMAIL PROTECTED]] Sent: Sunday, March 04, 2001 5:03 PM To: [EMAIL PROTECTED] Subject: Recursive

Re: Recursive queries

2001-03-05 Thread Pierre-Alain Joye
create table root( create table subcats( create table subsections( And now I need 230 levels, huh :). How about a simple tree structure ? hth pa - Before posting, please check: http://www.mysql.com/manual.php (the

Re: Recursive queries

2001-03-05 Thread Isaac Force
On Mon, 5 Mar 2001 10:13:29 -0600 "Johnny Withers" [EMAIL PROTECTED] wrote: Well, if you have everything setup right.. this is easy to do in SQL. Lets say you have your root table: [...] and your sub categories: [...] and your final category: [...] now you can simply join all

Re: Recursive queries

2001-03-05 Thread Isaac Force
On Mon, 5 Mar 2001 21:50:42 + Pierre-Alain Joye [EMAIL PROTECTED] wrote: create table root( create table subcats( create table subsections( And now I need 230 levels, huh :). How about a simple tree structure ? If our thinking of a tree structure is the same, I believe that this

Re: Recursive queries

2001-03-05 Thread Bob Hall
Quick searches of Google and the MySQL page didn't turn up anything, so I'll ask here.. Here's what I have: I have a table that among others, have fields called 'section_id' and 'parent_id'. The section_id is the id of the "self" section, and the parent_id is the id of the section that "owns"