Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 2.5.0b5

Bug #19237 MDB2 fails to see data in mysql table
Submitted: 2012-01-22 12:34 UTC
From: johnk_uk Assigned: danielc
Status: Duplicate Package: MDB2 (version 2.4.1)
PHP Version: 5.3.9 OS: Windows 7
Roadmaps: (Not assigned)    
Subscription  


 [2012-01-22 12:34 UTC] johnk_uk (John Kirkpatrick)
Description: ------------ Test script uses MDB2 to create database, create table and insert data into table. Table is then queried and no results returned. Native connection is then established and retrieves data as expected. MDB2 succesfully deletes database. Identical behaviour on OS X 10.7.2/PHP 5.3.6. Test script: --------------- Attached Expected result: ---------------- $mdb2->queryAll("SHOW TABLES"); should return "beatles" $mdb2->queryAll("SELECT * FROM beatles"); should return (1, "John"), (2, "Paul", (3, "George"), (4, "Ringo") Actual result: -------------- Both queries return zero rows and do not report an error. Actual output is attached.

Comments

 [2012-01-22 12:40 UTC] johnk_uk (John Kirkpatrick)
 [2012-01-22 13:00 UTC] johnk_uk (John Kirkpatrick)
Apologies: a newbie error confusing patches with attachments. Example code and output is at http://www.isc-ltd.co.uk/pear_19237.
 [2012-03-02 20:09 UTC] lambik (Tom Mmmmmm)
I have the same problem as you, most likely. I can query "select * from table" fine with mysql_query() but I cannot do it with MDB2. There is no error, it just pretends that there are no results.
 [2012-03-02 20:56 UTC] lambik (Tom Mmmmmm)
This is what I see when debugging: PHP Warning: mysql_fetch_row() expects parameter 1 to be resource, object given in PEAR\MDB2\Driver\mysql.php on line 1163 (after I removed the @ in front of the function) So the $result being passed in to the function, is not a resource. I don't know why not however!
 [2012-03-02 21:18 UTC] danielc (Daniel Convissor)
-Status: Open +Status: Feedback -Assigned To: +Assigned To: danielc
I'm pretty sure was fixed in SVN a while ago. Can you please try it?
 [2012-03-02 21:30 UTC] lambik (Tom Mmmmmm)
I'm quite the newbie on this.. All I know is "pear upgrade", so should I just svn get the files from your repository and overwrite the ones in my pear folders scattered around?
 [2012-03-02 21:36 UTC] lambik (Tom Mmmmmm)
Okay, easier than expected: pear install MDB2-2.5.0b3 And now this bug is fixed indeed, I have no issues anymore, the query results are there :-)
 [2012-03-03 00:03 UTC] johnk_uk (John Kirkpatrick)
I can also confirm the bug is fixed in MDB2-2.5.0b3. Thank you.
 [2012-10-24 20:43 UTC] danielc (Daniel Convissor)
-Status: Feedback +Status: Duplicate
It's fixed. Marking as "duplicate" so it doesn't show up in automatically generated change logs.