Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:42487 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 48297 invoked from network); 5 Jan 2009 15:32:36 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Jan 2009 15:32:36 -0000 Authentication-Results: pb1.pair.com smtp.mail=mls@pooteeweet.org; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=mls@pooteeweet.org; sender-id=unknown Received-SPF: error (pb1.pair.com: domain pooteeweet.org from 88.198.8.16 cause and error) X-PHP-List-Original-Sender: mls@pooteeweet.org X-Host-Fingerprint: 88.198.8.16 bigtime.backendmedia.com Linux 2.6 Received: from [88.198.8.16] ([88.198.8.16:34488] helo=bigtime.backendmedia.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D6/59-07052-41822694 for ; Mon, 05 Jan 2009 10:32:36 -0500 Received: from localhost (unknown [127.0.0.1]) by bigtime.backendmedia.com (Postfix) with ESMTP id 789DA4144059; Mon, 5 Jan 2009 15:33:43 +0000 (UTC) X-Virus-Scanned: amavisd-new at backendmedia.com Received: from bigtime.backendmedia.com ([127.0.0.1]) by localhost (bigtime.backendmedia.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id F6RPCEj7H08k; Mon, 5 Jan 2009 16:33:42 +0100 (CET) Received: from [192.168.80.52] (unknown [195.226.16.50]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: mls@pooteeweet.org) by bigtime.backendmedia.com (Postfix) with ESMTP id 762FF414400F; Mon, 5 Jan 2009 16:33:42 +0100 (CET) Cc: Oskar Eisemuth Message-ID: <65868A42-9F4A-43B1-8D51-C426E24B7B0F@pooteeweet.org> To: internals@lists.php.net In-Reply-To: <495FCE1A.2000904@gmail.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v930.3) Date: Mon, 5 Jan 2009 16:32:31 +0100 References: <495FCE1A.2000904@gmail.com> X-Mailer: Apple Mail (2.930.3) Subject: Re: [PHP-DEV] PDO: table name of field in SQLite #42589 and a new fetch style FETCH_ASSOC_TREE From: mls@pooteeweet.org (Lukas Kahwe Smith) On 03.01.2009, at 21:44, Oskar Eisemuth wrote: > Hi > > Receiving the table name for an column is quite useful. > It is not possible for all PDO database drivers to support this > functionally, still at least the SQLite version could support it > when Bug #42589 is resolved. ATTR_FETCH_TABLE_NAMES should be added > to SQLite too. Scott said he would look into committing the patch for SQLite. > PDO::FETCH_ASSOC_TREE > Using the column key to build a hierarchical tree structure by using > the dot as delimiter for the keys. Personally I am not such a fan of the bit-wise parameter approach. Then again it provides a lot of flexibility. That being said finding a good API for this particular feature is non trivial (maybe we can borrow from LINQ?). Of course having PHP do this work internally is more efficient than doing it in userland and I think its an often seen enough use case. So I guess file a feature request, ideally with a solid proposal for an API for this. regards, Lukas Kahwe Smith mls@pooteeweet.org