On 10/19/2016 07:04 PM, Chris Wright wrote:

Right. For instance, binding query parameters with mysql-native. The
thing you're binding is passed by reference and I'm not sure why.


It's been like that since mysql-native's original release, by the original author, some years ago.

I suspect the idea was a rudimentary ORM-like approach: to have the prepared statement params semi-permanently tied to actual variables (ie, "bound" to them). Ie, so you could re-exectute the same prepared statement with different values just by changing the values and calling `execPrepared` again, without calling any of the bind functions again.

I'd have to check whether or not that usage pattern currently works though.

Reply via email to