At 7:27 AM + 2/27/08, Thufir wrote:
I'm reading "SQL for dummies" and one of the more interesting sections
was on recursion. The example query was something like:
WITH RECURSIVE
ReachableFrom (Source, Destination)
AS (SELECT Source, Destination
FROM FLIGHT
l Message-
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Thufir
Sent: Wednesday, February 27, 2008 12:28 AM
To: mysql@lists.mysql.com
Subject: recursion
I'm reading "SQL for dummies" and one of the more interesting sections
was on recursion. The example query was somethin
I'm reading "SQL for dummies" and one of the more interesting sections
was on recursion. The example query was something like:
WITH RECURSIVE
ReachableFrom (Source, Destination)
AS (SELECT Source, Destination
FROM FLIGHT
UNION
SELECT in.Source, out.Destina
Mike,
>What I'd love to do is pull all children (and grandchildren, etc) per
>each, such that I'd end up with the following result set or something
See http://www.artfulsoftware.com/mysqlbook/sampler/mysqled1ch20.html
for theory & examples.
PB
Mike Johnson wrote:
This one may end up dead in
This one may end up dead in the water, but I figured I'd run it past the
group as I've seen some pretty creative solutions in my time here.
Let's say I have a table like this:
++---+
| id | parent_id |
++---+
| 1 | 0 |
| 2 | 0 |
| 3 | 2 |
| 4 |
irList($base_dir);
> $retval['dirs']=$getDirList_alldirs;
> $retval['files']=$getDirList_allfiles;
> return $retval;
> }
> ?>
>
>
>
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, November 01, 2005 11:09 AM
> To: Brian e
"Brian e Boothe" <[EMAIL PROTECTED]> wrote on 10/31/2005 10:21:35 PM:
> I.m needing assistance in get a problem Solved ,
>
> What im attempting to do is have MySQL thru asp or PHP look thru
> Folders and add to a Mysql database the path and folder name and file
> located within that direct
I.m needing assistance in get a problem Solved ,
What im attempting to do is have MySQL thru asp or PHP look thru
Folders and add to a Mysql database the path and folder name and file
located within that directory into the database, can anyone help me ?? or
give me hints
--
No virus fou
Amer,
It's still worth storing the parentId, because you can easily recreate the
fullpath if (when!) your code screws up a set of full paths. You can also
write a reliable sanity checker that checks the full path of all the nodes
in the table based on the parentids.
Also, to locate multiple chil
> Subject: RE: Recursion
>Date: Wed, 12 Feb 2003 09:36:11 -
>From: "Andy Eastham" <[EMAIL PROTECTED]>
> To: "Mysql@Lists. Mysql. Com" <[EMAIL PROTECTED]>
>
> Rob,
>
> This is a common problem in document mana
ailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 12, 2003 11:36 AM
To: Mysql@Lists. Mysql. Com
Subject: RE: Recursion
Rob,
This is a common problem in document management, where I have a reasonable
amount of experience.
Unfortunately, the short answer is, that to be completely generic, efficien
and pretty efficient.
If you like, you can remove the objects own id from the fullpath and make it
effectively "parent path"
Hope this helps.
All the best,
Andy
> -Original Message-
> From: Rob [mailto:[EMAIL PROTECTED]]
> Sent: 12 February 2003 07:18
> To: [EMAIL P
Hi all,
I need some help with recursion in mySql. I have the following table:
ID | Name | ParentID
1 | Bob | 0
2 | John | 1
3 | Elm | 1
etc.
For a given ID, I need to recurse up the tree and get all the parents. I've
already read
about Joe Celko's
Hi all,
I need some help with recursion in mySql. I have the following table:
ID | Name | ParentID
1 | Bob | 0
2 | John | 1
3 | Elm | 1
etc.
For a given ID, I need to recurse up the tree and get all the parents. I've
already read
about Joe Celko's nested se
y so I can see what is really going on.
This is far from a MySQL question. Try a perl forum, or any
algorithm's manual.
You need to understand the basics of recursion before you can
understand that bit of code.
Greetz, Peter.
somebody step me through this one slowly so I can see the flow of where a
number gets passed all the way to the end where it returns the final number.
I am getting hung up here the most where the actual recursion takes place
I guess where I am getting lossed is where does the calculation take
16 matches
Mail list logo