|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2012-07-02 13:36 UTC] uw@php.net
-Status: Open
+Status: Feedback
[2012-07-02 13:36 UTC] uw@php.net
[2012-07-02 18:47 UTC] s-php at ertel-net dot de
[2013-02-18 00:35 UTC] php-bugs at lists dot php dot net
[2013-02-19 13:01 UTC] s-php at ertel-net dot de
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 13:00:01 2025 UTC |
Description: ------------ When I concatenate two queries with UNION an there are static strings in the queries, mysqli only reserves a big enough variable for the strings in the first query. If there are static strings in the other queries after the UNION, the strings are just cut off. Test script: --------------- $stmt = $this->mysqli->prepare("SELECT 'read' AS Action FROM tbl1 UNION SELECT CASE status WHEN 0 THEN 'request-received' WHEN 1 THEN 'confirmed' WHEN 2 THEN 'x' END AS Action FROM tbl2"); $stmt->bind_result($action); $stmt->execute(); while($stmt->fetch()) { echo $action . " "; } Expected result: ---------------- expected output is: read request-received confirmed Actual result: -------------- actual output is: read request-recei confirmed The "request-received" is cut off!