Exemplo n.º 1
0
 public static function fetch_array($queryDB, $objectStr = '', $fetchType = 'SQLSRV_FETCH_ASSOC')
 {
     switch (self::$dbType) {
         case "mysqli":
             $row = $queryDB->fetch_array();
             if (is_object($objectStr)) {
                 $objectStr($row);
             }
             return $row;
             break;
         case "sqlserver":
             $row = DatabaseSqlserver::fetch_array($queryDB, $objectStr, $fetchType);
             return $row;
             break;
         case "mssql":
             $row = DatabaseMSSQL::fetch_array($queryDB, $objectStr, $fetchType);
             return $row;
             break;
         case "pdo":
             $row = DatabasePDO::fetch_assoc($queryDB);
             return $row;
             break;
     }
 }