Re: query() of common.php

From: Date: Tue, 13 Mar 2001 22:13:37 +0000
Subject: Re: query() of common.php
References: 1  Groups: php.pear 
Request: Send a blank email to php-pear+get-1820@lists.php.net to get a copy of this message
[Burak DAYIOGLU <dayioglu@metu.edu.tr>] > Hello all, > The below code is the most up to date implementation of query() in > common.php. The === seems to be a typo. Furthermore can anyone please > explain me the difference of query() and simplequery()? As far as I > understand with using simplequery()'s, I am only having a single result > set and when I use query(), I am having multiple result sets to operate > on. Is it the correct definition of the difference? No, the === is not a typo. It is the "exact equal" operator of PHP (which does not convert types when comparing). The simpleQuery() method returns a native result resource (just like for example mysql_query() does). The query() method returns a DB_result object, which is a wrapper object for the result resource (providing methods like fetchRow() and numCols()). > When will serious class documentation for PEAR start? I really want to > join in to help documenting classes as long as someone guides the staff. > > regards, > -bd > > function &query($query) { > $result = $this->simpleQuery($query); > if (DB::isError($result) || $result === DB_OK) { > return $result; > } else { > return new DB_result($this, $result); > } > } The documentation process has started. Check out the phpdoc/en/pear directory (I'm doing copy/paste from javadoc comments for now, we just need something that works until we have a satisfactory phpdoc solution). To document the class Foo_Bar, make a file called pear/foo-bar.xml. Start with a <reference id="class.foo-bar"> element, for member functions use <refentry id="function.foo-bar.method">. Feel free to email me directly if you need guidance. - Stig -- Stig Sæther Bakken <ssb@fast.no> Fast Search & Transfer ASA, Trondheim, Norway

« previous php.pear (#1820) next »