Re: pdo bindParam() with named parameters

From: Date: Thu, 10 Feb 2005 23:53:15 +0000
Subject: Re: pdo bindParam() with named parameters
References: 1 2  Groups: php.pecl.dev 
Request: Send a blank email to pecl-dev+get-1957@lists.php.net to get a copy of this message
For MS-SQL we have a hybrid case, where it uses emulation for regular queries, but has a native interface for calling stored procedures. For these, the parameter name can be passed directly to the driver. I haven't spec'd out all the details yet, but I don't want to paint myself into a corner by being too lax so early on; it is better to be more restrictive at this stage, and possibly open up in a later iteration. --Wez. On Fri, 11 Feb 2005 00:46:50 +0100, Edin Kadribasic <edink@emini.dk> > 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 (#1957) next »