Re: [PHP-DEV] PDO integer changes in 8.1 will stop many websites I support

2021-02-27 Thread Kamil Tekiela
Hi Matthew, As was pointed out before ZEROFILL is getting deprecated. It has been deprecated by MySQL and I assume MariaDB will follow soon. The change you are referring to is only to fix inconsistency in PHP. The problem with ZEROFILL has been present since forever as far as I know. The setting

Re: [PHP-DEV] PDO integer changes in 8.1 will stop many websites I support

2021-02-27 Thread Rowan Tommins
On 27/02/2021 15:51, Pierre wrote: Yes, but PDOStatement::execute() explicitly documents that it can be used only for prepared queries. The same is true of bindParam and bindValue - the only way of using parameters is to first "prepare" a query. Whether that's a real prepare (on the database

Re: [PHP-DEV] PDO integer changes in 8.1 will stop many websites I support

2021-02-27 Thread Pierre
Le 27/02/2021 à 15:39, Rowan Tommins a écrit : On 27/02/2021 14:03, Pierre wrote: I'm curious, why are you stating that emulated prepares are not useful anymore ? Emulated prepares are a slightly dangerous idea, because they give the impression of separating query from data, but actually use st

Re: [PHP-DEV] PDO integer changes in 8.1 will stop many websites I support

2021-02-27 Thread Nikita Popov
On Sat, Feb 27, 2021 at 9:50 AM Matty The Mad wrote: > PHP 8.1 PDO has been changed so that when MySQL returns an integer it > will no longer be returned as a string, but as an int. > > The problem is this breaks any sites that use UNSIGNED ZEROFILL integer > fields in MySQL. > > I support a numb

Re: [PHP-DEV] PDO integer changes in 8.1 will stop many websites I support

2021-02-27 Thread Rowan Tommins
On 27/02/2021 14:03, Pierre wrote: I'm curious, why are you stating that emulated prepares are not useful anymore ? Emulated prepares are a slightly dangerous idea, because they give the impression of separating query from data, but actually use string escaping internally. Historically, I be

Re: [PHP-DEV] PDO integer changes in 8.1 will stop many websites I support

2021-02-27 Thread Pierre
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

Re: [PHP-DEV] PDO integer changes in 8.1 will stop many websites I support

2021-02-27 Thread David Gebler
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

Re: [PHP-DEV] PDO integer changes in 8.1 will stop many websites I support

2021-02-27 Thread Stephen Reay
> On 27 Feb 2021, at 15:56, Matty The Mad wrote: > > PHP 8.1 PDO has been changed so that when MySQL returns an integer it will > no longer be returned as a string, but as an int. > > The problem is this breaks any sites that use UNSIGNED ZEROFILL integer > fields in MySQL. > > I support a

Re: [PHP-DEV] PDO integer changes in 8.1 will stop many websites I support

2021-02-27 Thread David Gebler
Hi Matthew, 1. PHP 8 has not introduced a change to PDO_MYSQL in respect of how values are fetched. What makes the difference as to whether you get MySQL INT values fetched as strings or integers is whether you are running PHP with the mysqlnd https://dev.mysql.com/downloads/connector/php-mysqlnd/