Fetch row as associative.

@return array or null
435636
function fetch_entry() {
		$result = $this->stmt->fetch(\PDO::FETCH_ASSOC);

		if ($result === false) {
			return null;
		}
		else { // succesfully retrieved statement
			return $result;
		}
	}
1222129
private function fetchTargetRows()
    {
        $model  = $this->targetModel();
        $source = $model->source();

        $sql = strtr(
            'SELECT %key FROM `%table`',
            [
                '%table' => $source->table(),
                '%key'   => $this->oldPrimaryKey(),
            ]
        );

        return $source->db()->query($sql, PDO::FETCH_ASSOC);
    }
277372
public function loadRow()
	{
		// Initialise variables
		$return = null;

		// Execute the query
		if (!$this->execute())
		{
			return null;
		}

		// Get the first row from the result set as an array
		if ($row = $this->fetchArray())
		{
			$return = $row;
		}

		// Free up system resources and return
		$this->freeResult();

		return $return;
	}
1046461
public function loadAssoc()
	{
		$this->connect();

		$ret = null;

		// Execute the query and get the result set cursor.
		if (!($cursor = $this->execute()))
		{
			return;
		}

		// Get the first row from the result set as an associative array.
		$array = $this->fetchAssoc($cursor);

		if ($array)
		{
			$ret = $array;
		}

		// Free up system resources and return.
		$this->freeResult($cursor);

		return $ret;
	}
342912
public function fetchNextObject()
	{
		if( $this->cursor < $this->RecordCount() )
		{
			$this->cursor ++;
			return $this->rows[$this->cursor-1];
		}
		else return FALSE;
	}
525122
function fetch($fetchMode = PDO::FETCH_ASSOC) {
        return $this->_data($this->query()->fetch($fetchMode),false);
        //return $this->query()->fetch($fetchMode);
    }
782554
protected function getQueryResultRow()
    {
        if ($this->fetchedResults === null) {
            $this->fetchedResults = $this
                ->getQueryResult()
                ->fetchAll();
        }

        return array_shift($this->fetchedResults);
    }
499102
function fetch() {

        $this->execute();

        list( $index, $row ) = each( $this->rows );

        return $row;

    }
209726
public function fetch()
        {
            try {
                if ($this->values = $this->statement->fetch(\PDO::FETCH_ASSOC)) {
                    return $this->values;
                } else {
                    return false;
                }
            } catch (\PDOException $e) {
                throw new Exception('An error occured while trying to fetch the result: "' . $e->getMessage() . '"');
            }
        }
597720
public function rows()
	{
		$rows = parent::rows();

		// Now remove any associative fields
		foreach ($rows as $row)
		{
			$associatives = new \stdClass();

			foreach ($row->getAttributes() as $k => $v)
			{
				if (strpos($k, 'associative_') === 0)
				{
					$key = substr($k, 12);
					$associatives->$key = $v;
					$row->removeAttribute($k);
				}
			}

			if (!empty($associatives))
			{
				$row->associated = $associatives;
			}
		}

		return $rows;
	}
1297307
public function fetchRow()
    {
        $opts = $this->options;
        $opts['limit'] = 1;
        
        $sql = QueryBuilder::optionsToSql($opts);
        $row = $this->getDb()->getRow($sql);
        
        return $row;        
    }
594719
public function fetchAll($type=SQLAnywhereClient::FETCH_ASSOC)
	{
		$data = array();
		
		if ($this->result) {
			switch ($type) {
				case 'array':
					while ($row = sasql_fetch_array( $this->result ))
						array_push($data, $row);
				break;

				case 'assoc':
					while ($row = sasql_fetch_assoc( $this->result ))
						array_push($data, $row);
				break;

				case 'row':
					while ($row = sasql_fetch_row( $this->result ))
						array_push($data, $row);
				break;

				case 'field':
					while ($row = sasql_fetch_field( $this->result ))
						array_push($data, $row);
				break;

				case 'object':
					while ($row = sasql_fetch_object( $this->result ))
						array_push($data, $row);			
				break;
				
				default:
					while ($row = sasql_fetch_array( $this->result ))
						array_push($data, $row);
				break;
			}		
		}

		return $data;
	}
839442
protected function getHeaderRow()
    {
        $first_item = reset($this->data);

        $keys       = array_keys($first_item);
        $first_key  = reset($keys);

        // We have an associative array (probably), let's have a header row
        if (!is_int($first_key)) {
            return array_combine($keys, $keys);
        }

        return false;
    }
1038002
private function fetchRow()
    {
        ++$this->cursor;
        $imageId = $this->rowReader->getRow();

        if (substr($imageId, 0, strlen($this->prefix)) == $this->prefix) {
            $imageId = ltrim(substr($imageId, strlen($this->prefix)), '/');
        }

        $this->item = $imageId;
    }
472384
protected function _fetch() {
		if (!$this->_resource instanceof PDOStatement) {
			$this->close();
			return false;
		}
		try {
			if ($result = $this->_resource->fetch(PDO::FETCH_NUM)) {
				return [$this->_iterator++, $result];
			}
		} catch (PDOException $e) {
			$this->close();
			return false;
		}
		return null;
	}
165064
public function getRows()
    {
        $query = $this->getQuery();
        
        if (!empty($this->columns)) {
            $query->select(implode(', ', $this->columns));
        }
        
        foreach ($this->sort as $key => $value) {
            $query->sortBy($key, $value);
        }
        
        if ($this->range) {
            $query->limit($this->start, $this->range);
        }
        
        if (!empty($this->group)) {
            $query->groupBy($this->group);
        }
        
        return $this->database->query($query, $this->database->getBinds());
    }
948033
private function getAssociations() : array
    {
        $result = [];
        foreach ($this->getQueryFields() as $field) {
            $association = $this->getAssociationByField($field);
            if (null === $association) {
                continue;
            }

            if (array_key_exists($association->getName(), $result)) {
                continue;
            }

            $result[$association->getName()] = $association;
        }

        return $result;
    }