Subversion Repositories Applications.papyrus

Rev

Rev 320 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 320 Rev 443
Line 18... Line 18...
18
 * @author     Stig Bakken <ssb@php.net>
18
 * @author     Stig Bakken <ssb@php.net>
19
 * @author     Tomas V.V. Cox <cox@idecnet.com>
19
 * @author     Tomas V.V. Cox <cox@idecnet.com>
20
 * @author     Daniel Convissor <danielc@php.net>
20
 * @author     Daniel Convissor <danielc@php.net>
21
 * @copyright  1997-2005 The PHP Group
21
 * @copyright  1997-2005 The PHP Group
22
 * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
22
 * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
23
 * @version    CVS: $Id: common.php,v 1.1 2005-03-30 08:50:33 jpm Exp $
23
 * @version    CVS: $Id: common.php,v 1.2 2005-09-20 17:01:22 ddelon Exp $
24
 * @link       http://pear.php.net/package/DB
24
 * @link       http://pear.php.net/package/DB
25
 */
25
 */
Line 26... Line 26...
26
 
26
 
27
/**
27
/**
Line 40... Line 40...
40
 * @author     Stig Bakken <ssb@php.net>
40
 * @author     Stig Bakken <ssb@php.net>
41
 * @author     Tomas V.V. Cox <cox@idecnet.com>
41
 * @author     Tomas V.V. Cox <cox@idecnet.com>
42
 * @author     Daniel Convissor <danielc@php.net>
42
 * @author     Daniel Convissor <danielc@php.net>
43
 * @copyright  1997-2005 The PHP Group
43
 * @copyright  1997-2005 The PHP Group
44
 * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
44
 * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
45
 * @version    Release: 1.7.5
45
 * @version    Release: @package_version@
46
 * @link       http://pear.php.net/package/DB
46
 * @link       http://pear.php.net/package/DB
47
 */
47
 */
48
class DB_common extends PEAR
48
class DB_common extends PEAR
49
{
49
{
50
    // {{{ properties
50
    // {{{ properties
Line 477... Line 477...
477
    // {{{ setFetchMode()
477
    // {{{ setFetchMode()
Line 478... Line 478...
478
 
478
 
479
    /**
479
    /**
480
     * Sets the fetch mode that should be used by default for query results
480
     * Sets the fetch mode that should be used by default for query results
481
     *
481
     *
482
     * @param integer $fetchmode   DB_FETCHMODE_ORDERED or DB_FETCHMODE_ASSOC,
-
 
483
     *                              possibly bit-wise OR'ed with
482
     * @param integer $fetchmode    DB_FETCHMODE_ORDERED, DB_FETCHMODE_ASSOC
484
     *                              DB_FETCHMODE_FLIPPED
-
 
485
     *
483
     *                               or DB_FETCHMODE_OBJECT
486
     * @param string $object_class  the class name of the object to be returned
484
     * @param string $object_class  the class name of the object to be returned
487
     *                               by the fetch methods when the
485
     *                               by the fetch methods when the
488
     *                               DB_FETCHMODE_OBJECT mode is selected.
486
     *                               DB_FETCHMODE_OBJECT mode is selected.
489
     *                               If no class is specified by default a cast
487
     *                               If no class is specified by default a cast
490
     *                               to object from the assoc array row will be
488
     *                               to object from the assoc array row will be
491
     *                               done.  There is also the posibility to use
489
     *                               done.  There is also the posibility to use
492
     *                               and extend the 'DB_row' class.
490
     *                               and extend the 'DB_row' class.
493
     *
491
     *
494
     * @see DB_FETCHMODE_ORDERED, DB_FETCHMODE_ASSOC, DB_FETCHMODE_FLIPPED,
-
 
495
     *      DB_FETCHMODE_OBJECT
492
     * @see DB_FETCHMODE_ORDERED, DB_FETCHMODE_ASSOC, DB_FETCHMODE_OBJECT
496
     */
493
     */
497
    function setFetchMode($fetchmode, $object_class = 'stdClass')
494
    function setFetchMode($fetchmode, $object_class = 'stdClass')
498
    {
495
    {
499
        switch ($fetchmode) {
496
        switch ($fetchmode) {
Line 1569... Line 1566...
1569
     *                            execution of the statement.  Quantity of
1566
     *                            execution of the statement.  Quantity of
1570
     *                            items passed must match quantity of
1567
     *                            items passed must match quantity of
1571
     *                            placeholders in query:  meaning 1
1568
     *                            placeholders in query:  meaning 1
1572
     *                            placeholder for non-array parameters or
1569
     *                            placeholder for non-array parameters or
1573
     *                            1 placeholder per array element.
1570
     *                            1 placeholder per array element.
1574
     * @param int    $fetchmode  the fetch mode to use
1571
     * @param int    $fetchmode  the fetch mode to use:
-
 
1572
     *                            + DB_FETCHMODE_ORDERED
-
 
1573
     *                            + DB_FETCHMODE_ASSOC
-
 
1574
     *                            + DB_FETCHMODE_ORDERED | DB_FETCHMODE_FLIPPED
-
 
1575
     *                            + DB_FETCHMODE_ASSOC | DB_FETCHMODE_FLIPPED
1575
     *
1576
     *
1576
     * @return array  the nested array.  A DB_Error object on failure.
1577
     * @return array  the nested array.  A DB_Error object on failure.
1577
     */
1578
     */
1578
    function &getAll($query, $params = array(),
1579
    function &getAll($query, $params = array(),
1579
                     $fetchmode = DB_FETCHMODE_DEFAULT)
1580
                     $fetchmode = DB_FETCHMODE_DEFAULT)