odbc_tables

FunctionParams and return types changed in PHP 8.4

Get the list of table names stored in a specific data source.

PHP 5
PHP 7
PHP 8.0
Improved
PHP 8.1
PHP 8.2-8.3
PHP 8.4
Improved
PHP 8.5
PHP 8.6

odbc_tables Function synopsis

odbc_tables(
    Odbc\Connection $odbc,
    ?string $catalog = null,
    ?string $schema = null,
    ?string $table = null,
    ?string $types = null
  ): Odbc\Result|false

Parameters

$odbc

TypeOdbc\Connection

$catalog

OptionalType?stringDefault valuenull

The catalog ("qualifier" in ODBC 2 parlance).

$schema

OptionalType?stringDefault valuenull

The schema ("owner" in ODBC 2 parlance). This parameter accepts the following search patterns: % to match zero or more characters, and _ to match a single character.

$table

OptionalType?stringDefault valuenull

The name. This parameter accepts the following search patterns: % to match zero or more characters, and _ to match a single character.

$types

OptionalType?stringDefault valuenull

If $table_type is not an empty string, it must contain a list of comma-separated values for the types of interest; each value may be enclosed in single quotes (') or unquoted. For example, 'TABLE','VIEW' or TABLE, VIEW. If the data source does not support a specified table type, odbc_tables does not return any results for that type.

Return value

TypeOdbc\Result|false

Returns an ODBC result object containing the information or false on failure.

The result set has the following columns:

Drivers can report additional columns.

Changes to the odbc_tables Function

PHP 8.4

  • Return type added: Odbc\Result|false
  • Parameter type added for parameter #1 ($odbc): Odbc\Connection
  odbc_tables(
-     $odbc,
+     Odbc\Connection $odbc,
      ?string $catalog = null,
      ?string $schema = null,
      ?string $table = null,
      ?string $types = null
-   )
+   ): Odbc\Result|false

PHP 8.0

  • Parameter name of parameter #1 changed: $connection_id to $odbc
  • Parameter name of parameter #2 changed: $qualifier to $catalog
  • Parameter type added for parameter #2 ($catalog): ?string
  • Parameter default value added for position #2 ($catalog): null
  • Parameter name of parameter #3 changed: $owner to $schema
  • Parameter type added for parameter #3 ($schema): ?string
  • Parameter default value added for position #3 ($schema): null
  • Parameter name of parameter #4 changed: $name to $table
  • Parameter type added for parameter #4 ($table): ?string
  • Parameter default value added for position #4 ($table): null
  • Parameter name of parameter #5 changed: $table_types to $types
  • Parameter type added for parameter #5 ($types): ?string
  • Parameter default value added for position #5 ($types): null
  odbc_tables(
-     $connection_id,
+     $odbc,
-     $qualifier,
+     ?string $catalog = null,
-     $owner,
+     ?string $schema = null,
-     $name,
+     ?string $table = null,
-     $table_types
+     ?string $types = null
    )

odbc_tables Function Availability

PHP VersionAvailability
PHP 8.6Upcoming Release Yes
PHP 8.5Supported (Latest) Yes
PHP 8.4Supported Yes
PHP 8.3Security-Fixes Only Yes
PHP 8.2Security-Fixes Only Yes
PHP 8.1Unsupported Yes
PHP 8.0Unsupported Yes
PHP 7.4Unsupported Yes
PHP 7.3Unsupported Yes
PHP 7.2Unsupported Yes
PHP 7.1Unsupported Yes
PHP 7.0Unsupported Yes
PHP 5.6Unsupported Yes
PHP 5.5Unsupported Yes
PHP 5.4Unsupported Yes
PHP 5.3Unsupported Yes