Re: Mysql result data types

From: Date: Thu, 12 Oct 2017 12:02:24 +0000
Subject: Re: Mysql result data types
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-100870@lists.php.net to get a copy of this message
Am 12.10.2017 um 13:55 schrieb Reinis Rozitis:
is there a reason (technical or historical) why the data coming from MySQL is always strings? I've found only one case where the data type is "honored" - PDO+mysqlnd+emulation off [1]
not entirely true, our database-layer acts directly with mysqli and unconditionally enables native types for the last 8 months or so after we mirgated our whole code to PHP7 native types no idea what the state of PDO is http://blog.ulf-wendel.de/2008/php-new-network-traffic-cpu-and-memory-savings-with-mysqlnd/ if(mysqli_options($this->conn, MYSQLI_OPT_INT_AND_FLOAT_NATIVE, true) === false) { $this->error('mysqli_options(MYSQLI_OPT_INT_AND_FLOAT_NATIVE) failed'); }

« previous php.internals (#100870) next »