Re: pdo bindParam() with named parameters

From: Date: Thu, 10 Feb 2005 23:46:50 +0000
Subject: Re: pdo bindParam() with named parameters
References: 1  Groups: php.pecl.dev 
Request: Send a blank email to pecl-dev+get-1956@lists.php.net to get a copy of this message
On Thursday, Feb 10, 2005, at 16:43 Europe/Copenhagen, Wez Furlong wrote:
Dan is on the right wavelength. It's designed to be explicit. Being explicit is a good habit, IMNSHO. I *really* don't want to change this. There are really good technical reasons why this is the way it is. It's future proof to be explicit (I've already hinted at @ prefixes for some RDBMS coming soon).
So let me get this straight. If my DB supports :prefixes or is using default PDO param emulation I would do this: $myData = array(":param1" => "val1", ":param2" => "val2"); $stmt->execute($myData); while for the upcoming dbs with @ params: $myData = array("@param1" => "val1", "@param2" => "val2"); $stmt->execute($myData); or any other variant any given database might support? Edin

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