note 105068 added to mysqli-stmt.bind-result

From: Date: Tue, 26 Jul 2011 05:31:33 +0000
Subject: note 105068 added to mysqli-stmt.bind-result
Groups: php.notes 
Request: Send a blank email to php-notes+get-181873@lists.php.net to get a copy of this message
According to the above documentation: "Depending on column types bound variables can silently change to the corresponding PHP type. " if you specify a field as int (tinyint, mediumint, etc.) with zerofill property, it will be converted (silently) to PHP integer (erasing the leading zeros). In order to keep those leading zeros, one solution is to specify the field as decimal. Note that this only happens when using prepared statements and not when executing the query directly. More info at: http://stackoverflow.com/questions/6825106/php-mysql-zerofill-is-lost-when-using-mysqli-prepare/6825470 ---- Server IP: 69.147.83.197 Probable Submitter: 211.6.179.194 ---- Manual Page -- http://www.php.net/manual/en/mysqli-stmt.bind-result.php Edit -- https://master.php.net/note/edit/105068 Del: integrated -- https://master.php.net/note/delete/105068/integrated Del: useless -- https://master.php.net/note/delete/105068/useless Del: bad code -- https://master.php.net/note/delete/105068/bad+code Del: spam -- https://master.php.net/note/delete/105068/spam Del: non-english -- https://master.php.net/note/delete/105068/non-english Del: in docs -- https://master.php.net/note/delete/105068/in+docs Del: other reasons-- https://master.php.net/note/delete/105068 Reject -- https://master.php.net/note/reject/105068 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#181873) next »