reference/ibase/functions/ibase-service-detach.xml
4d8da419011b34623bc91aab8d5ef7f5b6bfb128
...
...
@@ -12,9 +12,22 @@
12
12
<type>bool</type><methodname>ibase_service_detach</methodname>
13
13
<methodparam><type>resource</type><parameter>service_handle</parameter></methodparam>
14
14
</methodsynopsis>
15
+
</refsect1>
15
16
16
-
&warn.undocumented.func;
17
-

17
+
<refsect1 role="parameters">
18
+
&reftitle.parameters;
19
+
<para>
20
+
<variablelist>
21
+
<varlistentry>
22
+
<term><parameter>service_handle</parameter></term>
23
+
<listitem>
24
+
<para>
25
+
A previously created connection to the database server.
26
+
</para>
27
+
</listitem>
28
+
</varlistentry>
29
+
</variablelist>
30
+
</para>
18
31
</refsect1>
19
32

20
33
<refsect1 role="returnvalues">
...
...
@@ -24,6 +37,45 @@
24
37
</para>
25
38
</refsect1>
26
39
40
+
<refsect1 role="examples">
41
+
&reftitle.examples;
42
+
<para>
43
+
<example>
44
+
<title><function>ibase_service_detach</function> example</title>
45
+
<programlisting role="php">
46
+
<![CDATA[
47
+
<?php
48
+
// Attach to the remote Firebird server by ip address
49
+
if (($service = ibase_service_attach('10.1.1.199', 'sysdba', 'masterkey')) != FALSE) {
50
+
51
+
// Successfully attached.
52
+
// Fetch server version (something like 'LI-V3.0.4.33054 Firebird 3.0')
53
+
$server_version = ibase_server_info($service, IBASE_SVC_SERVER_VERSION);
54
+

55
+
// Fetch server implementation (something like 'Firebird/Linux/AMD/Intel/x64')
56
+
$server_implementation = ibase_server_info($service, IBASE_SVC_IMPLEMENTATION);
57
+

58
+
// Detach from server (disconnect)
59
+
if(ibase_service_detach($service) == FALSE) {
60
+
echo "Error on service detach.";
61
+
}
62
+
else {
63
+
echo "Successfully detached from service.";
64
+
}
65
+

66
+
}
67
+
else {
68
+
// Output message on error
69
+
$conn_error = ibase_errmsg();
70
+
die($conn_error);
71
+
}
72
+

73
+
?>
74
+
]]>
75
+
</programlisting>
76
+
</example>
77
+
</para>
78
+
</refsect1>
27
79
</refentry>
28
80

29
81
<!-- Keep this comment at the end of the file
30
82