MySQL Heirarchies

2003-10-18 Thread techsoldaten
I am stumped on a MySQL query, it involves returning information sorted into a heirarchy. There's this table with the following fields: item_id, parent_id, and comment. Item_id is the unique identifier of each record, and each record can be a child of another. Parent_id reflects this relationship.

RE: MySQL Heirarchies

2003-10-20 Thread Barney Boisvert
, 2003 10:47 PM   To: CF-Talk   Subject: MySQL Heirarchies   I am stumped on a MySQL query, it involves returning information sorted into a heirarchy.   There's this table with the following fields: item_id, parent_id, and comment. Item_id is the unique identifier of each record, and each

RE: MySQL Heirarchies

2003-10-20 Thread Haggerty, Mike
PM To: CF-Talk Subject: RE: MySQL Heirarchies I don't think you'll be able to do it, because you can't use stored procedures with MySQL.  You can use a temp table, if you want, though.  Just run a CREATE TEMPORARY TABLE statement.  However, I suspect that pulling the raw re

RE: MySQL Heirarchies

2003-10-20 Thread Barney Boisvert
Mike [mailto:[EMAIL PROTECTED]   Sent: Monday, October 20, 2003 11:34 AM   To: CF-Talk   Subject: RE: MySQL Heirarchies   Barney -   I suspect you are right, and that the real solution is to do the   processing on the Web server side.   The real problem is the lack of recursion in MySQL, and this iss

RE: MySQL Heirarchies

2003-10-20 Thread Haggerty, Mike
Well, the best solution at that point does not involve a database, but I appreciate your thoughts. M -Original Message- From: Barney Boisvert [mailto:[EMAIL PROTECTED] Sent: Monday, October 20, 2003 2:41 PM To: CF-Talk Subject: RE: MySQL Heirarchies MySQL 5.0 (in alpha) has

Re: MySQL Heirarchies

2003-10-20 Thread Jochem van Dieten
Haggerty, Mike wrote: >   > The real problem is the lack of recursion in MySQL, and this issue is > independent of stored procedures. It would be nice if it was possible to > write a query, loop around it, and store intermediate results in a > temporary table within the database. >   > For the rec

Re: MySQL Heirarchies

2003-10-20 Thread Matt Robertson
Charlie Griefer wrote: >The NULL attribute (which, as we've seen, is 'YES' or 'NO') simply >indicates whether to insert a NULL value. DOH! Never occurred to me to use the NULL parameter like this.  Incredibly useful. -- --- Matt Robertson, [EMAIL P

Re: MySQL Heirarchies

2003-10-21 Thread Thomas Chiverton
On Monday 20 Oct 2003 19:25 pm, Barney Boisvert wrote: > I don't think you'll be able to do it, because you can't use stored > procedures with MySQL.   You can in the current dev., and it will be in the v5 release. -- Tom Chiverton Advanced ColdFusion Programmer Tel: +44(0)1749 834997 email: [

FW: MySQL Heirarchies (fwd)

2003-10-21 Thread Ross, Jason
Haggerty, Mike > To: CF-Talk > Sent: Monday, October 20, 2003 2:58 PM > Subject: RE: MySQL Heirarchies > > > Well, the best solution at that point does not involve a database, but > I appreciate your thoughts. [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

RE: MySQL Heirarchies (fwd)

2003-10-21 Thread Barney Boisvert
o: CF-Talk   Subject: FW: MySQL Heirarchies (fwd)   wouldn't this be pretty close?   SELECT parents.id AS parent, children.id as child   FROM parentChild parents   INNER JOIN parentChild children   ON children.par_id = parents.id;   Need to add something in there for the NULL par_id's

RE: MySQL Heirarchies (fwd)

2003-10-21 Thread Haggerty, Mike
table to itself for purposes of sorting heirarchical information. M -Original Message- From: Barney Boisvert [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 21, 2003 12:55 PM To: CF-Talk Subject: RE: MySQL Heirarchies (fwd) It needs to go an arbitrary number of levels, righ

Re: MySQL Heirarchies (fwd)

2003-10-22 Thread Deanna Schneider
s.postgresql.org/pgsql-general/2000-06/msg00449.php - Original Message - From: "Haggerty, Mike" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Tuesday, October 21, 2003 4:04 PM Subject: RE: MySQL Heirarchies (fwd) > Yeah, ideally the solution