source/Core/Model/ListModel.php
public function selectString($sql, array $parameters = [])
    {
        $this->clear();

        $oDb = \OxidEsales\Eshop\Core\DatabaseProvider::getDb(\OxidEsales\Eshop\Core\DatabaseProvider::FETCH_MODE_ASSOC);
        if ($this->_aSqlLimit[0] || $this->_aSqlLimit[1]) {
            $rs = $oDb->selectLimit($sql, $this->_aSqlLimit[1], max(0, $this->_aSqlLimit[0]), $parameters);
        } else {
            $rs = $oDb->select($sql, $parameters);
        }

        if ($rs != false && $rs->count() > 0) {
            $oSaved = clone $this->getBaseObject();

            while (!$rs->EOF) {
                $oListObject = clone $oSaved;

                $this->_assignElement($oListObject, $rs->fields);

                $this->add($oListObject);

                $rs->fetchRow();
            }
        }
    }
public function selectString($sql, array $parameters = [])
    {
        $this->clear();

        $oDb = \OxidEsales\Eshop\Core\DatabaseProvider::getDb(\OxidEsales\Eshop\Core\DatabaseProvider::FETCH_MODE_ASSOC);
        if ($this->_aSqlLimit[0] || $this->_aSqlLimit[1]) {
            $rs = $oDb->selectLimit($sql, $this->_aSqlLimit[1], max(0, $this->_aSqlLimit[0]), $parameters);
        } else {
            $rs = $oDb->select($sql, $parameters);
        }

        if ($rs != false && $rs->count() > 0) {
            $oSaved = clone $this->getBaseObject();

            while (!$rs->EOF) {
                $oListObject = clone $oSaved;

                $this->_assignElement($oListObject, $rs->fields);

                $this->add($oListObject);

                $rs->fetchRow();
            }
        }
    }
public function selectString ( $ sql , array $ parameters = [ ] ) { $ this -> clear ( ) ; $ oDb = \ OxidEsales \ Eshop \ Core \ DatabaseProvider :: getDb ( \ OxidEsales \ Eshop \ Core \ DatabaseProvider :: FETCH_MODE_ASSOC ) ; if ( $ this -> _aSqlLimit [ 0 ] || $ this -> _aSqlLimit [ 1 ] ) { $ rs = $ oDb -> selectLimit ( $ sql , $ this -> _aSqlLimit [ 1 ] , max ( 0 , $ this -> _aSqlLimit [ 0 ] ) , $ parameters ) ; } else { $ rs = $ oDb -> select ( $ sql , $ parameters ) ; } if ( $ rs != false && $ rs -> count ( ) > 0 ) { $ oSaved = clone $ this -> getBaseObject ( ) ; while ( ! $ rs -> EOF ) { $ oListObject = clone $ oSaved ; $ this -> _assignElement ( $ oListObject , $ rs -> fields ) ; $ this -> add ( $ oListObject ) ; $ rs -> fetchRow ( ) ; } } }
Convert results of the given select statement into objects and store them in _aArray.

Developers are encouraged to use prepared statements like this:
$sql = 'SELECT * FROM `mytable` WHERE oxid = ?';
$parameters = ['MYOXID']
selectString($sql, $parameters)

@param string $sql        SQL select statement or prepared statement
@param array  $parameters Parameters to be used in a prepared statement
Convert results of the given select statement into objects and store them in _aArray .