Re: MDB2: Prepared statement help

From: Date: Mon, 24 Jul 2006 09:56:20 +0000
Subject: Re: MDB2: Prepared statement help
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-24739@lists.php.net to get a copy of this message
Mark Steudel wrote:
$sql = "INSERT INTO tblzipfiles ( moduleid, zipfilename ) VALUES ( :moduleid, :zipfilename ) ON DUPLICATE KEY UPDATE zipfilename = :zipfilename";
The prepared statement API in MySQL is still rather fresh (requires MySQL 4.1). If prepared statements are not supported on your server or if you choose to emulate them using the "emulate_prepared" option, it could work. However then you are obviously loosing the performance advantage of prepared statements. That being said .. it will not on most RDBMS. PostgreSQL in theory supports reusing the same placeholder in several places. However in MDB2 you are expected to really use separate placeholder names for every placeholder. regards, Lukas

« previous php.pear.general (#24739) next »