webguynow Posted September 21, 2009 Share Posted September 21, 2009 I'm having some real issues using MDB2, and my queries are not executing properly. I'm using the debug option, and also relying on print_r and var_dump of my results. The bug I'm running into prevents my results from returning, and always has RECURSION I've reviewed the tutorials, examples and they all look straightforward. Helpful sites: being phpied, codepoets (D.Goodwin), and blogspot tutorial. I've done various things with the 'Extended' package, but at this point, just looking to do something like: $mdb2->query("select id, name from vendors where id=3"); *** excerpts from output *** object(MDB2_BufferedResult_mysqli) .... ["result"]=> *RECURSION* Env. I'm on a WinXP machine, running PHP 5.3, and using PEAR 1.8.1 and MDB2 2.4.1 I have noticed trying to create an MDB2 object and establish a connection, can be touchy MDB2::connect($dsn); // usually doesn't work MDB2::factory($dsn); // works fine I'll ask a few simple questions: In my php.ini I've enabled both mysql and mysqli - Is that OK ? I realize that MDB2 requires a Sub-Package driver for the type of connection you are trying to use. Generally, I've been using mysqli so I can use some of the Prepared Statements and AutoExecute functionality. I'm assuming I can do a simple $mdb2->query() with mysqli; Is that right ? Did my libraries get screwed up somehow ? There's enough examples and I even have a LAMP app on a shared host using simple queries and Extended queries; All that works OK, online. What does this "recursion" mean, and how can I debug this, to get back using MDB2 again ? Suggestions from someone who's been through this would be extremely helpful. Quote Link to comment https://forums.phpfreaks.com/topic/175017-pear-mdb2-issues-with-query-recursion/ Share on other sites More sharing options...
webguynow Posted October 7, 2009 Author Share Posted October 7, 2009 I'm revisiting this subject, and I'm just showing excerpts from my code: Simple query $rs = $mdb->query("select id, name, addr from grocers where id=34"); when I var_dump($rs) It's evident, I didn't get valid result set. ["_error_class"]=> string(10) "PEAR_Error" ["_expected_errors"]=> array(0) { } } ["result"]=> *RECURSION* ["rownum"]=> int(-1) ["types"]=> array(0) { } Can anyone shed light on what *RECURSION* is, and how to fix it ? I had MDB2 working right at one point, and that's what is frustrating. Quote Link to comment https://forums.phpfreaks.com/topic/175017-pear-mdb2-issues-with-query-recursion/#findComment-932125 Share on other sites More sharing options...
webguynow Posted October 14, 2009 Author Share Posted October 14, 2009 Still an issue. Any advice ? Oh I get it - I'm the only one that botched my machine and got MDB2 Recursion ! ( I think not ) Quote Link to comment https://forums.phpfreaks.com/topic/175017-pear-mdb2-issues-with-query-recursion/#findComment-937058 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.