[Last Call] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 472
  • Last Modified:

Good PEAR::MDB2 documentation

Hi all,

I'm looking for a good documentation about the PEAR module MDB2.
I need :
- a complete list of the functions ;
- detailed description of each function ;
- a lot of examples.

I don't care of the format (HTML, PDF, CHM) ;D
Richard Coffre
Richard Coffre
  • 5
  • 3
1 Solution
Richard QuadlingSenior Software DeverloperCommented:

Is the official dox. Is there more you need?
Richard CoffreAuthor Commented:
I found it when I downloaded the package, but it is just an introduction.
Richard QuadlingSenior Software DeverloperCommented:
Hmm. Ok. What more info do you need?

For example http://pear.php.net/manual/en/package.database.mdb2.intro-query.php contains 2 good examples on the Query.

http://oss.backendmedia.com/MDB2 also looks useful.
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Richard CoffreAuthor Commented:
For example, I think that the doc it is a little bit light when it describes the use of queryAll and default options.

E.g. ,  I used the following request with native Mysql lib :

$select  = "SELECT rplcats.WCATA,  cat_name, category_description , WTYPC, WLIMA, cat_ID ";
      $select .= "FROM rplcata, rplcats, wp_categories ";
      $select .= "WHERE rplcata.WCATA = rplcats.WCATA ";
      $select .= "AND rplcata.WCATA = wp_categories.category_nicename ";
      $select .= "AND rplcats.WLANG = 'FRA' ";
      $select .= "ORDER BY WPRIO";

When I read to use queryAll with the mode $mdb2->setFetchMode(MDB2_FETCHMODE_ASSOC);  I realize that the indexes are in lowercase instead of what it is exactly written in the query.
So far i use, e.g., $ligne['WCATA'] but now it is $ligne['wcata'].

I do not find why, I have to do so !!!
Richard QuadlingSenior Software DeverloperCommented:
From what I can see there are some settings related to setting/alterning the case of the columns.

$this->db->options['portability'] & MDB2_PORTABILITY_FIX_CASE


$this->db->options['field_case'] == CASE_LOWER

You can set the field_case option to the DB to CASE_LOWER or CASE_UPPER

See MDB2.php Line 1057 (// $Id: MDB2.php,v 1.216 2006/06/11 14:17:42 lsmith Exp $)

Richard QuadlingSenior Software DeverloperCommented:
From what I know of PEAR, the best way to get the documentation is to build your own using the PEARDocumentor. As part of the PEAR standard, the source code must contain specifically structured comments to allow an external application to build the documentation.

MDB2 is no different in that regard. Take a look at the source to see some of the comments. It is very clearly commented.
Richard CoffreAuthor Commented:
I created the doc using PHPDocumentor.

Thanks a lot.
Richard QuadlingSenior Software DeverloperCommented:

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

  • 5
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now