Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:15719 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 58787 invoked by uid 1010); 1 Apr 2005 21:05:20 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 58772 invoked from network); 1 Apr 2005 21:05:20 -0000 Received: from unknown (HELO prodigy.net) (127.0.0.1) by localhost with SMTP; 1 Apr 2005 21:05:20 -0000 X-Host-Fingerprint: 212.112.227.169 ipx11223.ipxserver.de Linux 2.4/2.6 Received: from ([212.112.227.169:55678] helo=ipx11223.ipxserver.de) by pb1.pair.com (ecelerity HEAD r(5268)) with SMTP id C3/13-22409-E87BD424 for ; Fri, 01 Apr 2005 16:05:19 -0500 Received: from localhost (localhost [127.0.0.1]) by ipx11223.ipxserver.de (Postfix) with ESMTP id 61550DF014F; Fri, 1 Apr 2005 23:05:46 +0200 (CEST) Received: from ipx11223.ipxserver.de ([127.0.0.1]) by localhost (ipx11223 [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 06432-09; Fri, 1 Apr 2005 23:05:43 +0200 (CEST) Received: from [192.168.0.100] (i528C10E9.versanet.de [82.140.16.233]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ipx11223.ipxserver.de (Postfix) with ESMTP id 20D24DF0118; Fri, 1 Apr 2005 23:05:43 +0200 (CEST) Message-ID: <424DB787.10900@php.net> Date: Fri, 01 Apr 2005 23:05:11 +0200 User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Wez Furlong Cc: "Thies C. Arntzen" , Marcus Boerger , internals@lists.php.net References: <1383893714.20050331102838@marcus-boerger.de> <1e14419686962a473412d07a3192ba41@thieso.net> <4e89b4260504010525116632ff@mail.gmail.com> In-Reply-To: <4e89b4260504010525116632ff@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by somedaemon at backendmedia.com Subject: Re: [PHP-DEV] pdo: binding variables supplied to execute() is NotVeryUseful(tm)... From: lsmith@php.net (Lukas Smith) Wez Furlong wrote: > Yep, will do. I dont want to pretend that this change should open the flood gates for radical changes. However there are still a few minor points beyond the bindParam() that may need minor adjustments. Some of them can be added later of course .. 1) DSN http://oss.backendmedia.com/index.php?area=PDO&page=DSN It would be nice to be able as an array and for the string format it would be nice to also have the option of using the established PEAR DSN format 2) exec() http://oss.backendmedia.com/index.php?area=PDO&page=exec It may be nice to have a simple one shot prepared query to be able to do a prepare/execute in one call. 3) setAttribute/getAttribute http://oss.backendmedia.com/index.php?area=PDO&page=setAttribute Some of the "attributes" are actually more like options that can be defined by the user. Others are defined by the client and yet others are defined by the server and cannot be changed by the user. I think atleast the user definable options should be moved to a separate setOption/getOption set of methods. 4) minor API stuff in the fetch methods I think it would be clearer to call the fetch() method fetchRow() because that is what the method does. I also dont think we should default to PDO_FETCH_BOTH. It may also be a nice touch towards PEAR::[M]DB[2] to rename the fetchSingle() method to fetchOne(). Its also more clearer since fetchSingle() might as well imply a single row. Fetching a single row should probably be handled by a fetchCol() method. regards, Lukas