sqlsrv_fetch_array example



    /** * Returns the result set as an array. * * Overridden by driver classes. * * @return array|false|null */
    protected function fetchAssoc()
    {
        return sqlsrv_fetch_array($this->resultID, SQLSRV_FETCH_ASSOC);
    }

    /** * Returns the result set as an object. * * @return Entity|false|object|stdClass */
    protected function fetchObject(string $className = 'stdClass')
    {
        if (is_subclass_of($className, Entity::class)) {
            return empty($data = $this->fetchAssoc()) ? false : (new $className())->injectRawData($data);
        }
Home | Imprint | This part of the site doesn't use cookies.