Re: Idea: PDO - Single-round-trip prepared statements

From: Date: Fri, 03 Nov 2017 19:49:20 +0000
Subject: Re: Idea: PDO - Single-round-trip prepared statements
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-101044@lists.php.net to get a copy of this message
Hi Scott, On 03/11/2017 16:33, Scott Arciszewski wrote: > 1. Which DB drivers (and which versions) support 1RT prepared statements in > addition to 2RT prepared statements? > 2. Is there a better name for this usage than safeQuery()? > > If this turns out to be a good idea, I'll write up an RFC targeting PHP 7.3. I've added a similar feature to pdo_pgsql a while ago (PDO::PGSQL_ATTR_DISABLE_PREPARES), which is not enabled by default. It is basically somwthing in between real prepared statements (which is the default on pdo_pgsql) and emulated prepares, and it uses libpq's own PQexecParams function. At that time I had checked if libmysqlclient offered a similar function, but it didn't seem like it, so I went for the pgsql-only constant. Cheers -- Matteo Beccati Development & Consulting - http://www.beccati.com/

« previous php.internals (#101044) next »