<?php
// 使用 db2_table_privileges 示例:
$result = db2_table_privileges($conn,NULL,'DB2ADMIN');
while($obj = db2_fetch_object($result)){
print_r($obj)
}
/* 输出
stdClass Object
(
[TABLE_CAT] =>
[TABLE_SCHEM] => DB2ADMIN
[TABLE_NAME] => SALARY
[GRANTOR] => SYSIBM
[GRANTEE] => DB2ADMIN
[PRIVILEGE] => ALTER
[IS_GRANTABLE] => YES
)
stdClass Object
(
[TABLE_CAT] =>
[TABLE_SCHEM] => DB2ADMIN
[TABLE_NAME] => SALARY
[GRANTOR] => SYSIBM
[GRANTEE] => DB2ADMIN
[PRIVILEGE] => CONTROL
[IS_GRANTABLE] => NO
)
stdClass Object
(
[TABLE_CAT] =>
[TABLE_SCHEM] => DB2ADMIN
[TABLE_NAME] => SALARY
[GRANTOR] => SYSIBM
[GRANTEE] => DB2ADMIN
[PRIVILEGE] => DELETE
[IS_GRANTABLE] => YES
)
*/
?>