Project

General

Profile

« Previous | Next » 

Revision 2128

Added by darkviper almost 9 years ago

  1. framework/WbDatabase correction in ::fetchAsscoc()

View differences:

WbDatabase.php
439 439
 */
440 440
    public function fetchAssoc()
441 441
    {
442
        if ($typ != MYSQLI_NUM) {
443
            trigger_error('Deprecated call: '.__CLASS__.'::'.__METHOD__.' for MYSQLI_ASSOC|MYSQL_BOTH', E_USER_DEPRECATED);
444
            return mysqli_fetch_array($this->result, $typ);
445
        } else {
446
            return mysqli_fetch_row($this->result);
442
        return mysqli_fetch_row($this->result);
443
    }
444
/**
445
 * fetchArray
446
 * @param  int $iType MYSQL_ASSOC(default) | MYSQL_BOTH | MYSQL_NUM
447
 * @return array of current record
448
 * @description get current record and increment pointer
449
 */
450
    public function fetchArray($iType = MYSQLI_ASSOC)
451
    {
452
        if ($iType < MYSQLI_ASSOC || $iType > MYSQLI_BOTH) {
453
            $iType = MYSQLI_ASSOC;
447 454
        }
455
        return mysqli_fetch_array($this->result, $iType);
448 456
    }
449 457
/**
450 458
 * fetchObject
......
462 470
        }
463 471
    }
464 472
/**
465
 * fetchArray
466
 * @param  int $iType MYSQL_ASSOC(default) | MYSQL_BOTH | MYSQL_NUM
467
 * @return array of current record
468
 * @description get current record and increment pointer
469
 */
470
    public function fetchArray($iType = MYSQLI_ASSOC)
471
    {
472
        if ($iType < MYSQLI_ASSOC || $iType > MYSQLI_BOTH) {
473
            $iType = MYSQLI_ASSOC;
474
        }
475
        return mysqli_fetch_array($this->result, $iType);
476
    }
477
/**
478 473
 * fetchAll
479 474
 * @param  int $iType MYSQL_ASSOC(default) | MYSQL_NUM
480 475
 * @return array of rows

Also available in: Unified diff