#31044 [Com]: UNION with parenthesis doest return first fields data

From: Date: Wed, 03 Aug 2005 14:34:01 +0000
Subject: #31044 [Com]: UNION with parenthesis doest return first fields data
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-82889@lists.php.net to get a copy of this message
ID: 31044 Comment by: syre at citiz dot net Reported By: argentina at gmail dot com Status: No Feedback Bug Type: MySQL related Operating System: Linux Redhat PHP Version: 4.3.8 New Comment: I also meet with this problem. when use select * from table1 union (select * from table2) that will cause the problem. if use select field from table1 union (select field from table2) that will ok. Previous Comments: ------------------------------------------------------------------------ [2004-12-25 01:00:04] php-bugs at lists dot php dot net No feedback was provided for this bug for over a week, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open". ------------------------------------------------------------------------ [2004-12-17 03:00:30] sniper@php.net Thank you for this bug report. To properly diagnose the problem, we need a short but complete example script to be able to reproduce this bug ourselves. A proper reproducing script starts with <?php and ends with ?>, is max. 10-20 lines long and does not require any external resources such as databases, etc. If possible, make the script source available online and provide an URL to it here. Try avoid embedding huge scripts into the report. ------------------------------------------------------------------------ [2004-12-09 23:21:38] argentina at gmail dot com Description: ------------ When I execute that query from MySQL directly (MySQL CC), all rows return correctly. When I execute it from PHP, the FIRST ROW does not return any data, but the next ones do. If I remove the parenthesis, the query returns correctly all the data. Reproduce code: --------------- (SELECT * FROM table1) UNION (SELECT * FROM table2) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=31044&edit=1

« previous php.bugs (#82889) next »