Jump to content

Pear MDB2 Issues with query (RECURSION)


webguynow

Recommended Posts

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.

Link to comment
https://forums.phpfreaks.com/topic/175017-pear-mdb2-issues-with-query-recursion/
Share on other sites

  • 3 weeks later...

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.

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.