public setFetchMode (mixed $fetchMode, [mixed $colNoOrClassNameOrObject], [mixed $ctorargs])
Changes the fetching mode affecting Phalcon\Db\Result\Pdo::fetch()
1 2 3 4 5 6 7 8 9 10 11 | //Return array with integer indexes $result ->setFetchMode(\Phalcon\Db::FETCH_NUM); //Return associative array without integer indexes $result ->setFetchMode(\Phalcon\Db::FETCH_ASSOC); //Return associative array together with integer indexes $result ->setFetchMode(\Phalcon\Db::FETCH_BOTH); //Return an object $result ->setFetchMode(\Phalcon\Db::FETCH_OBJ); |
Please login to continue.