Hi,
On 21 Feb 2008, at 23:50, Bill Karwin wrote:
It worked fine for me when I used the Mysqli Adapter. However, I
get the
exceptions you described when I changed the adapter to the Pdo_Mysql
Adapter.
Apparently, PDO isn't clever enough about noticing that the parameter
placeholder is inside a quoted string.
From what I have heard/been told (I asked on ##php about this a few
weeks ago) PDO does not use server-side prepared statements w/MySQL.
They are emulated client side, hence the error. According to this
blog post: http://netevil.org/blog/2006/apr/using-pdo-mysql this was
done to work-around several problems with server-side prepared
statements in MySQL.
From a performance perspective the difference between PDO emulated
prepared statements and MySQLi actual prepared statements for a batch
of 10,000 inserts is around 0.1s (2.0s to 1.9s).
Regards, Freddie.