Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:33343 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 61881 invoked by uid 1010); 19 Nov 2007 23:47:24 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 61864 invoked from network); 19 Nov 2007 23:47:24 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Nov 2007 23:47:24 -0000 Authentication-Results: pb1.pair.com header.from=mls@pooteeweet.org; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=mls@pooteeweet.org; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain pooteeweet.org from 85.10.196.195 cause and error) X-PHP-List-Original-Sender: mls@pooteeweet.org X-Host-Fingerprint: 85.10.196.195 serveforce1.backendmedia.com Linux 2.6 Received: from [85.10.196.195] ([85.10.196.195:45444] helo=serveforce1.backendmedia.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D2/03-50425-B8022474 for ; Mon, 19 Nov 2007 18:47:24 -0500 Received: from [192.168.0.163] (77-57-23-243.dclient.hispeed.ch [77.57.23.243]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (Client did not present a certificate) by serveforce1.backendmedia.com (Postfix) with ESMTP id 60333122417F; Tue, 20 Nov 2007 00:47:50 +0100 (CET) In-Reply-To: <3E.97.05823.18DE1474@pb1.pair.com> References: <3E.97.05823.18DE1474@pb1.pair.com> Mime-Version: 1.0 (Apple Message framework v752.3) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-ID: Cc: internals@lists.php.net Content-Transfer-Encoding: 7bit Date: Tue, 20 Nov 2007 00:47:09 +0100 To: Hans-Peter Oeri X-Mailer: Apple Mail (2.752.3) X-backendmedia-com-MailScanner-Information: Please contact the ISP for more information X-backendmedia-com-MailScanner: Found to be clean X-backendmedia-com-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=0.142, required 6, AWL 0.04, RDNS_DYNAMIC 0.10) X-backendmedia-com-MailScanner-From: mls@pooteeweet.org X-Spam-Status: No Subject: Re: [PHP-DEV] [PATCH] PDO::FETCH_2D From: mls@pooteeweet.org (Lukas Kahwe Smith) 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. > Columns that don't result from a table are added to a "null > base" (work > title). The default "null base" is the first level array: > $result[computedcolumn] > > The connection attribute ATTR_2D_NULLBASE (work title) defines an > alternative "null base": > $result[nullbase][computedcolumn] Why not use an empty string aka null casted to a string. That way you will never run into a situation where someone has called their table "nullbase". It will also make it immediatly clear to anyone that this array key is special. regards, Lukas