Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:15715 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 29328 invoked by uid 1010); 1 Apr 2005 15:00:25 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 29312 invoked from network); 1 Apr 2005 15:00:25 -0000 Received: from unknown (HELO php.net) (127.0.0.1) by localhost with SMTP; 1 Apr 2005 15:00:25 -0000 X-Host-Fingerprint: 81.169.182.136 h59705.serverkompetenz.net Linux 2.4/2.6 Received: from ([81.169.182.136:35992] helo=strato.aixcept.de) by pb1.pair.com (ecelerity HEAD r(5268)) with SMTP id 6A/BF-22409-7026D424 for ; Fri, 01 Apr 2005 10:00:24 -0500 Received: from localhost (localhost [127.0.0.1]) by strato.aixcept.de (Postfix) with ESMTP id EFB2735C1CD; Fri, 1 Apr 2005 17:05:56 +0200 (CEST) Date: Fri, 1 Apr 2005 10:00:18 -0500 Reply-To: Marcus Boerger X-Priority: 3 (Normal) Message-ID: <305323582.20050401100018@marcus-boerger.de> To: "Thies C.Arntzen" Cc: internals@lists.php.net In-Reply-To: <1e14419686962a473412d07a3192ba41@thieso.net> References: <1383893714.20050331102838@marcus-boerger.de> <1e14419686962a473412d07a3192ba41@thieso.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] pdo: binding variables supplied to execute() is NotVeryUseful(tm)... From: mail@marcus-boerger.de (Marcus Boerger) Hello Thies, Friday, April 1, 2005, 3:13:10 AM, you wrote: > Am 31.03.2005 um 17:28 schrieb Marcus Boerger: >> Hello Thies, >> >> Friday, March 25, 2005, 1:55:30 PM, you wrote: >> >>> and this is 'cause pdo _expects_ the user to prefix the bound >>> variables >>> with a colon. grr... >> >>> ppls, lets change it before it's too late. this "tiny bit" makes >>> binding >>> harder than it should be, and we all know and understand that all user >>> of php should use bound variables all the time! >> >>> suggestion: auto-trim a leading colon from the internal binding >>> tables. >>> that way "oldish" code would not break... >> >> >>> re, thies >> >>> PS: looking into that right now - hopefully "patch follows";-) >> >> >> We could easily add this behavior and i think it makes somewhat sense. >> It just looks a bit like __wakepup/__sleep. The only 'but' is that i >> suggest the behavior has its own method like 'bindParamArray'. If you >> cannot work out a patch feel free to contact me. Maybe i'll find some >> time during the conf. > hey marcus! > i don't quite understand the relation to sleep/wakeup here (i'm not > reading all the php lists, maybe you could point me to the right > thread?) > adding a new 'bindParamArray' with different semantics doesn't really > make things easier. and i think we should have once consistent > parameter-bind interface: > - a method bindParam > - an optinal associative array passed to execute. > all those functions expect to bind a to a statement. > this should work both with or without a leading colon. > by the way (just checked) - this is how the "native" oracle-oci binding > functions work. so oracle decided to make the colon in front of the > placeholder for bind optional. at the end of the day you can only bind > to a placeholder defined in your sql-statement. in the sql you have to > "mark" the placeholder by prepending a colon - but for the bind you > really don't need the colon. really! > so - again - lets make the colon *optional* - everywhere we allow > binding in PDO! > re, thies hmmm, this is just a copy'n'paste mistake somehow.... -- Best regards, Marcus mailto:mail@marcus-boerger.de