Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:25255 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 40634 invoked by uid 1010); 9 Aug 2006 08:35:39 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 40619 invoked from network); 9 Aug 2006 08:35:39 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Aug 2006 08:35:39 -0000 X-PHP-List-Original-Sender: derick@php.net X-Host-Fingerprint: 82.94.239.5 jdi.jdi-ict.nl Linux 2.5 (sometimes 2.4) (4) Received: from ([82.94.239.5:43431] helo=jdi.jdi-ict.nl) by pb1.pair.com (ecelerity 2.1.1.3 r(11751M)) with ESMTP id B0/BF-13488-75E99D44 for ; Wed, 09 Aug 2006 04:35:37 -0400 Received: from localhost (localhost [127.0.0.1]) by jdi.jdi-ict.nl (8.13.7/8.12.11) with ESMTP id k798ZW1N029588; Wed, 9 Aug 2006 10:35:32 +0200 Date: Wed, 9 Aug 2006 10:34:04 +0200 (CEST) X-X-Sender: derick@localhost To: Marian Kostadinov cc: internals@lists.php.net In-Reply-To: Message-ID: References: X-Face: "L'&?Ah3MYF@FB4hU'XhNhLB]222(Lbr2Y@F:GE[OO;"F5p>qtFBl|yVVA&D{A(g3[C}mG:199P+5C'v.M/u@Z\![0b:Mv.[l6[uWl' MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: Re: [PHP-DEV] PDO statement execute enhancement From: derick@php.net (Derick Rethans) On Wed, 9 Aug 2006, Marian Kostadinov wrote: > I have a suggestion that is related a little to my bug report #38394 ( > http://bugs.php.net/bug.php?id=38394). > > It's about the execution of a prepared statement. > Let's say we have a prepared statement for > > UPDATE table SET field1 = :field1, field2 = :field3 WHERE id = :id > > in order to execute it we have something like this: > $data = array ('id' => 3, 'field1' => 'value1', 'field2' => 'value2'); > $stmt->execute ($data); > > But I think that it is so common to have things like this > $data = array ('id' => 3, 'field1' => 'value1', 'field2' => 'value2', > 'field3' => 'value3', 'field4' => 'value4'); > $stmt->execute ($data); > > But that is not executed because we have some additional key/value pairs. > So the idea is to allow this. Also I suggest we allow using object along > with an array. This is a common situation also. Actually, it is dependent on the driver what happens here, which is not at all documented either. However, it would be nice if this indeed would work. Derick -- Derick Rethans http://derickrethans.nl | http://ez.no | http://xdebug.org