|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-09-27 16:57 UTC] tony2001@php.net
[2006-10-05 01:00 UTC] php-bugs at lists dot php dot net
[2006-10-27 20:04 UTC] jason at southerntextile dot com
[2006-10-27 21:23 UTC] jason at southerntextile dot com
[2006-11-06 17:49 UTC] jason at southerntextile dot com
[2006-11-26 17:53 UTC] kae at verens dot com
[2006-11-26 18:07 UTC] kae at verens dot com
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 01 13:00:01 2025 UTC |
Description: ------------ when using SELECT statement for selecting rows of table, and using fetchAll(or fetch) method the last character of each row will be lost. Reproduce code: --------------- $db_location = "table.sqlite"; $db = new PDO("sqlite:{$db_location}"); $db->query("create table my_table (name text);"); // table is empty $query = $db->query("delete from my_table"); $query = $db->query("insert into my_table (name) values ('123')"); $query = $db->query("select name from my_table"); while ($row = $query->fetch()) { print_r($row); } Expected result: ---------------- Array ( [name] => 123 [0] => 123 ) Actual result: -------------- Array ( [name] => 12 [0] => 12 )