odbc_tableprivileges
odbc_tableprivileges
Lists tables and the privileges associated with each table
**odbc_tableprivileges** Odbc\Connection $odbc $catalog string $schema string $table
Lists tables in the requested range and the privileges associated with each table.
odbc``catalogodbc.parameter.catalog
schemaodbc.parameter.schema
odbc.parameter.search
tableThe name.
odbc.parameter.search
odbc.result.object-return-falseforfailure
The result set has the following columns:
odbc.result.driver-specific
-
TABLE_CAT -
TABLE_SCHEM -
TABLE_NAME -
GRANTOR -
GRANTEE -
PRIVILEGE -
IS_GRANTABLEThe result set is ordered by , , , and .
TABLE_CAT``TABLE_SCHEM``TABLE_NAME``PRIVILEGE``GRANTEE
Voorbeeld: 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
}
?>
Array
(
[TABLE_CAT] => SalesOrders
[TABLE_SCHEM] => dbo
[TABLE_NAME] => Orders
[GRANTOR] => dbo
[GRANTEE] => dbo
[PRIVILEGE] => DELETE
[IS_GRANTABLE] => YES
)
odbc_tables