Good PEAR::MDB2 documentation

Posted on 2006-06-09
Last Modified: 2013-12-12
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
Question by:Richard Coffre
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
LVL 40

Expert Comment

by:Richard Quadling
ID: 16883563

Is the official dox. Is there more you need?

Author Comment

by:Richard Coffre
ID: 16883752
I found it when I downloaded the package, but it is just an introduction.
LVL 40

Expert Comment

by:Richard Quadling
ID: 16884266
Hmm. Ok. What more info do you need?

For example contains 2 good examples on the Query. 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!


Author Comment

by:Richard Coffre
ID: 16886454
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 !!!
LVL 40

Expert Comment

by:Richard Quadling
ID: 16892287
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 $)

LVL 40

Accepted Solution

Richard Quadling earned 125 total points
ID: 16892293
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.

Author Comment

by:Richard Coffre
ID: 16903258
I created the doc using PHPDocumentor.

Thanks a lot.
LVL 40

Expert Comment

by:Richard Quadling
ID: 16903279

Featured Post

Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

These days socially coordinated efforts have turned into a critical requirement for enterprises.
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to dynamically set the form action using jQuery.

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question