Re: PDO Parameter types // PDO::PARAM_AUTO

From: Date: Thu, 18 May 2017 10:17:57 +0000
Subject: Re: PDO Parameter types // PDO::PARAM_AUTO
References: 1 2 3 4 5  Groups: php.internals 
Request: Send a blank email to internals+get-99102@lists.php.net to get a copy of this message
Hi Dorin, On 18/05/2017 11:41, Dorin Marcoci wrote: >>> ! When a bool ZVAL variable is converted to a string ZVAL. >>> Your example is irrelevant. > >> Ok, I think I got it. But the example shows that the pgsql driver is working, so maybe you >> could have a look at how it works. >> e.g. >> >> https://github.com/php/php-src/blob/master/ext/pdo_pgsql/pgsql_statement.c#L382 > > Yup, it is working, I didn’t said it does not work. > > I meant the case when a bool is passed as string, like bindValue('boolparam', false); > Here it comes as an empty string, not "0", while true comes as "1". Please have a look again at my example and the code I linked. How could it work if what you say is true? Please note that the code is in the PDO_PARAM_EVT_EXEC_PRE case. Cheers -- Matteo Beccati Development & Consulting - http://www.beccati.com/

« previous php.internals (#99102) next »