Re: [PATCH] PDO::FETCH_2D

From: Date: Mon, 19 Nov 2007 23:53:50 +0000
Subject: Re: [PATCH] PDO::FETCH_2D
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-33345@lists.php.net to get a copy of this message
On 20.11.2007, at 00:47, Lukas Kahwe Smith wrote:
On 19.11.2007, at 21:09, Hans-Peter Oeri wrote:
FETCH_2D is the "core" of my proposal. It's like the ATTR_FETCH_TABLE_NAMES, enhanced in arrays. Columns are to be found on the second level: $result[tablename][columname]
Not sure how real world useful this is. What I have seen more is a need to build tree style structures. This would require knowing the FK's or allowing the user to specify the tree structure they want. This sort of thing is supported by C#'s LINQ.
Thinking about it, combined by grouping all of the arrays by some id column, one could maybe create tree structures with less overhead. But like I said ideally PDO would know about FKs and use those to build the tree structure automagically. Also since you seem to be in a PDO feature addition frenzy. Two features I would like to see: 1) lazy connect 2) driver independent DSN support regards, Lukas

« previous php.internals (#33345) next »