Re: pdo bindParam() with named parameters

From: Date: Thu, 10 Feb 2005 13:31:48 +0000
Subject: Re: pdo bindParam() with named parameters
References: 1 2 3  Groups: php.pecl.dev 
Request: Send a blank email to pecl-dev+get-1950@lists.php.net to get a copy of this message
On Thursday 10 February 2005 14:01, Lukas Smith wrote: > No the point is that I am likely to store the names of my fields inside > an array maybe like so: > > // [name] = type > fields['foo'] = PARAM_TYPE_LOB; > > I then do something like implode(', ', array_keys($fields)) to get the > list of fields in an insert statement. > > Anyways the point is that nowhere in the rest of the code will that > colon be more than a huge burden. (like if you store your schema in xml, > build an ORM etc). I agree that it would be more intuitive to use array keys without ":". From my own experience with first time PDO users on #php.pecl the issue comes up quite often because people assume that you would use ":field" placeholder and the query but "field" as array key. Wez, how about changing this behaviour? Edin

« previous php.pecl.dev (#1950) next »