Solved

Good PEAR::MDB2 documentation

Posted on 2006-06-09
8
420 Views
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
0
Comment
Question by:Richard Coffre
  • 5
  • 3
8 Comments
 
LVL 40

Expert Comment

by:RQuadling
ID: 16883563
http://pear.php.net/manual/en/package.database.mdb2.php

Is the official dox. Is there more you need?
0
 
LVL 1

Author Comment

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

Expert Comment

by:RQuadling
ID: 16884266
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.
0
 
LVL 1

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 !!!
0
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 40

Expert Comment

by:RQuadling
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

and

$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 $)

0
 
LVL 40

Accepted Solution

by:
RQuadling 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.
0
 
LVL 1

Author Comment

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

Thanks a lot.
0
 
LVL 40

Expert Comment

by:RQuadling
ID: 16903279
Excellent.
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

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…
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

747 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now