Le 27/02/2021 à 14:18, David Gebler a écrit :
Apologies, in respect of point 1 in my reply, I misread your original
message and didn't realise you were referring to the upcoming 8.1 change,
thought you were referring to the current 8.0.1 release.

This change AFAIK only affects emulated prepares and is an improvement, as
previously you needed to have emulation off to get the correct data types.
With modern PHP, MySQL and mysqnd there is not really a reason for anyone
to be using emulated prepares anyway so my advice on points 2-5 remains the
same.

Dave

Hello,

I'm curious, why are you stating that emulated prepares are not useful anymore ?

Using the prepare() function as I remember correctly seems to be the only way to execute a query that allows you to pass an array of parameters instead of having to call PDOStatement::bindParam() for each parameter. That's the only reason I use emulated prepares anyway, it allows to use this API without actually preparing the queries, which is what I want most of the time. Did I miss an improvement on that side ?

After reading twice what I said, I'm thinking that calling many times bindParam() in a naive foreach would work anyway. Is there any actual downside using emulated prepares this way ? Performance wise ? Feature wise ?

--

Pierre

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php

Reply via email to