odbc_tableprivileges

Lists tables and the privileges associated with each table

&reftitle.description; ``Odbc\Result``false```odbc_tableprivileges` `Odbc\Connection` `odbc` ``string``null```catalog` `string` `schema` `string` `table`

Lists tables in the requested range and the privileges associated with each table.

&reftitle.parameters;

`odbc`

- &odbc.connection.id;

`catalog`

- &odbc.parameter.catalog;

`schema`

- &odbc.parameter.schema; &odbc.parameter.search;

`table`

- The name. &odbc.parameter.search;

&reftitle.returnvalues;

&odbc.result.object-return-falseforfailure;

The result set has the following columns:

- `TABLE_CAT`

- `TABLE_SCHEM`

- `TABLE_NAME`

- `GRANTOR`

- `GRANTEE`

- `PRIVILEGE`

- `IS_GRANTABLE`

&odbc.result.driver-specific;

The result set is ordered by `TABLE_CAT`, `TABLE_SCHEM`, `TABLE_NAME`, `PRIVILEGE` and `GRANTEE`.

&reftitle.changelog;

&Version; | &Description;
&odbc.changelog.connection-param; &odbc.changelog.result-return;

&reftitle.examples;

### List Privileges of a Table

    <?php
    $conn = odbc_connect($dsn, $user, $pass);
    $privileges = odbc_tableprivileges($conn, 'SalesOrders', 'dbo', 'Orders');
    while (($row = odbc_fetch_array($privileges))) {
        print_r($row);
        break; // further rows omitted for brevity
    }
    ?>

&example.outputs.similar;

    Array
    (
        [TABLE_CAT] => SalesOrders
        [TABLE_SCHEM] => dbo
        [TABLE_NAME] => Orders
        [GRANTOR] => dbo
        [GRANTEE] => dbo
        [PRIVILEGE] => DELETE
        [IS_GRANTABLE] => YES
    )

&reftitle.seealso;

- `odbc_tables`