ID: 31175 Updated by: php-bugs@lists.php.net Reported By: vortexx at freemail dot hu -Status: Feedback +Status: No Feedback Bug Type: MySQL related Operating System: Windows 2000 Server, SP4 PHP Version: 5.0.3 New Comment:
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". Previous Comments: ------------------------------------------------------------------------ [2005-02-28 21:14:11] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5-latest.tar.gz For Windows: http://snaps.php.net/win32/php5-win32-latest.zip ------------------------------------------------------------------------ [2005-02-02 07:36:36] vortexx at freemail dot hu "a) The table is empty or the where clause didn't match any records " Table was not empty, and there was no WHERE clause. Moreover, the exact same query prodiced the expected results with PHP versions prior to 5.0.3. "b) an error occured, which should be checked by mysql_error() - in your case probably illegal mix of collations." Did test for an error - please see my original bug report: none occurred, at least mysql_error returned none. Also please note: same query (on the exact same database, etc.) works fine with PHP versions prior to 5.0.3 . I suspected perhaps this had something to do with the new php_mysql.dll included with the new (5.0.3+) PHP versions?! Since - ceteris paribus - the anomaly was directly linked to changing PHP versions. Once I changed back to the older version, it all worked fine again. If there is any more info whatsoever that you think might be necessary, please let me know! THANKS!!! ------------------------------------------------------------------------ [2005-02-02 06:48:46] [EMAIL PROTECTED] If mysql_query doesn't return a resultset for a select statement this has 2 reasons: a) The table is empty or the where clause didn't match any records b) an error occured, which should be checked by mysql_error() - in your case probably illegal mix of collations. Can't reproduce your error (tested with PHP 4 + 5, MySQL 4.1.10 and 5.0.3 and different character sets on server and client side). ------------------------------------------------------------------------ [2005-02-02 03:58:43] vortexx at freemail dot hu Sorry, but what do you mean "can't reporduce"? That you: - need more info to be able to do so? If so, please fire away, let me know what else you need, I would be glad to provide any info necessary - tried to reprodice but given the same circumstances the same code worked fine for you? Since this is MySQL related obviously I cannot "copy and paste" the MySQL tables themselves here. I can only give info as to the nature of tables involved. To reporoduce just try ANY MySQL query in PHP 5.0.3+ with a CONCAT of a field from a table plus a string: SELECT CONCAT('this is a string',field_from_table) as test FROM whatever_table The point is that whenever a SELECT with a CONCAT of a string and a table field is involved, the query returns nothing. If it's just a CONCAT of 2 or more fields from a table, then it's fine. If it's a CONCAT of 2 or more strings, no problem. As soon as it is a string plus a field, no results are returned. BEFORE 5.0.3 the same queries all worked just fine. Is this any help? If not, please let me know what info I should send! ------------------------------------------------------------------------ [2005-01-29 21:10:35] [EMAIL PROTECTED] Can't reproduce. Check your code and provide more info if you're still experiencing this problem. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/31175 -- Edit this bug report at http://bugs.php.net/?id=31175&edit=1