reference/uodbc/functions/odbc-tableprivileges.xml
ed1aff13602c94f86344bdd7c4fbc31f5a71bf84
ed1aff13602c94f86344bdd7c4fbc31f5a71bf84
...
...
@@ -9,11 +9,11 @@
9
9
<refsect1 role="description">
10
10
&reftitle.description;
11
11
<methodsynopsis>
12
-
<type>resource</type><methodname>odbc_tableprivileges</methodname>
13
-
<methodparam><type>resource</type><parameter>connection_id</parameter></methodparam>
14
-
<methodparam><type>string</type><parameter>qualifier</parameter></methodparam>
15
-
<methodparam><type>string</type><parameter>owner</parameter></methodparam>
16
-
<methodparam><type>string</type><parameter>name</parameter></methodparam>
12
+
<type class="union"><type>Odbc\Result</type><type>false</type></type><methodname>odbc_tableprivileges</methodname>
13
+
<methodparam><type>Odbc\Connection</type><parameter>odbc</parameter></methodparam>
14
+
<methodparam><type class="union"><type>string</type><type>null</type></type><parameter>catalog</parameter></methodparam>
15
+
<methodparam><type>string</type><parameter>schema</parameter></methodparam>
16
+
<methodparam><type>string</type><parameter>table</parameter></methodparam>
17
17
</methodsynopsis>
18
18
<para>
19
19
Lists tables in the requested range and the privileges associated
...
...
@@ -26,34 +26,34 @@
26
26
<para>
27
27
<variablelist>
28
28
<varlistentry>
29
-
<term><parameter>connection_id</parameter></term>
29
+
<term><parameter>odbc</parameter></term>
30
30
<listitem>
31
31
&odbc.connection.id;
32
32
</listitem>
33
33
</varlistentry>
34
34
<varlistentry>
35
-
<term><parameter>qualifier</parameter></term>
35
+
<term><parameter>catalog</parameter></term>
36
36
<listitem>
37
37
<para>
38
-
The qualifier.
38
+
&odbc.parameter.catalog;
39
39
</para>
40
40
</listitem>
41
41
</varlistentry>
42
42
<varlistentry>
43
-
<term><parameter>owner</parameter></term>
43
+
<term><parameter>schema</parameter></term>
44
44
<listitem>
45
45
<para>
46
-
The owner. Accepts the following search patterns:
47
-
('%' to match zero or more characters and '_' to match a single character)
46
+
&odbc.parameter.schema;
47
+
&odbc.parameter.search;
48
48
</para>
49
49
</listitem>
50
50
</varlistentry>
51
51
<varlistentry>
52
-
<term><parameter>name</parameter></term>
52
+
<term><parameter>table</parameter></term>
53
53
<listitem>
54
54
<para>
55
-
The name. Accepts the following search patterns:
56
-
('%' to match zero or more characters and '_' to match a single character)
55
+
The name.
56
+
&odbc.parameter.search;
57
57
</para>
58
58
</listitem>
59
59
</varlistentry>
...
...
@@ -64,28 +64,89 @@
64
64
<refsect1 role="returnvalues">
65
65
&reftitle.returnvalues;
66
66
<para>
67
-
An ODBC result identifier&return.falseforfailure;.
67
+
&odbc.result.object-return-falseforfailure;
68
68
</para>
69
69
<para>
70
70
The result set has the following columns:
71
71
<itemizedlist>
72
-
<listitem><simpara>TABLE_QUALIFIER</simpara></listitem>
73
-
<listitem><simpara>TABLE_OWNER</simpara></listitem>
74
-
<listitem><simpara>TABLE_NAME</simpara></listitem>
75
-
<listitem><simpara>GRANTOR</simpara></listitem>
76
-
<listitem><simpara>GRANTEE</simpara></listitem>
77
-
<listitem><simpara>PRIVILEGE</simpara></listitem>
78
-
<listitem><simpara>IS_GRANTABLE</simpara></listitem>
72
+
<listitem><simpara><literal>TABLE_CAT</literal></simpara></listitem>
73
+
<listitem><simpara><literal>TABLE_SCHEM</literal></simpara></listitem>
74
+
<listitem><simpara><literal>TABLE_NAME</literal></simpara></listitem>
75
+
<listitem><simpara><literal>GRANTOR</literal></simpara></listitem>
76
+
<listitem><simpara><literal>GRANTEE</literal></simpara></listitem>
77
+
<listitem><simpara><literal>PRIVILEGE</literal></simpara></listitem>
78
+
<listitem><simpara><literal>IS_GRANTABLE</literal></simpara></listitem>
79
79
</itemizedlist>
80
+
&odbc.result.driver-specific;
80
81
</para>
81
82
<simpara>
82
-
The result set is ordered by TABLE_QUALIFIER, TABLE_OWNER and
83
-
TABLE_NAME.
83
+
The result set is ordered by <literal>TABLE_CAT</literal>, <literal>TABLE_SCHEM</literal>,
84
+
<literal>TABLE_NAME</literal>, <literal>PRIVILEGE</literal> and <literal>GRANTEE</literal>.
84
85
</simpara>
85
86
</refsect1>
86
87
87
-
</refentry>
88
+
<refsect1 role="changelog">
89
+
&reftitle.changelog;
90
+
<informaltable>
91
+
<tgroup cols="2">
92
+
<thead>
93
+
<row>
94
+
<entry>&Version;</entry>
95
+
<entry>&Description;</entry>
96
+
</row>
97
+
</thead>
98
+
<tbody>
99
+
&odbc.changelog.connection-param;
100
+
&odbc.changelog.result-return;
101
+
</tbody>
102
+
</tgroup>
103
+
</informaltable>
104
+
</refsect1>
88
105
106
+
<refsect1 role="examples">
107
+
&reftitle.examples;
108
+
<example xml:id="odbc-tableprivileges.example.basic">
109
+
<title>List Privileges of a Table</title>
110
+
<programlisting role="php">
111
+
<![CDATA[
112
+
<?php
113
+
$conn = odbc_connect($dsn, $user, $pass);
114
+
$privileges = odbc_tableprivileges($conn, 'SalesOrders', 'dbo', 'Orders');
115
+
while (($row = odbc_fetch_array($privileges))) {
116
+
print_r($row);
117
+
break; // further rows omitted for brevity
118
+
}
119
+
?>
120
+
]]>
121
+
</programlisting>
122
+
&example.outputs.similar;
123
+
<screen>
124
+
<![CDATA[
125
+
Array
126
+
(
127
+
[TABLE_CAT] => SalesOrders
128
+
[TABLE_SCHEM] => dbo
129
+
[TABLE_NAME] => Orders
130
+
[GRANTOR] => dbo
131
+
[GRANTEE] => dbo
132
+
[PRIVILEGE] => DELETE
133
+
[IS_GRANTABLE] => YES
134
+
)
135
+
]]>
136
+
</screen>
137
+
</example>
138
+
</refsect1>
139
+
140
+
<refsect1 role="seealso">
141
+
&reftitle.seealso;
142
+
<para>
143
+
<simplelist>
144
+
<member><function>odbc_tables</function></member>
145
+
</simplelist>
146
+
</para>
147
+
</refsect1>
148
+
149
+
</refentry>
89
150
<!-- Keep this comment at the end of the file
90
151
Local variables:
91
152
mode: sgml
92
153