mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-19 10:28:54 +00:00

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@322055 c90b9560-bf6c-de11-be94-00142212c4b1
159 lines
3.5 KiB
XML
159 lines
3.5 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.maxdb-kill">
|
|
<refnamediv>
|
|
<refname>maxdb_kill</refname>
|
|
<refname>maxdb::kill</refname>
|
|
<refpurpose>Disconnects from a MaxDB server</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<para>&style.procedural;</para>
|
|
<methodsynopsis>
|
|
<type>bool</type><methodname>maxdb_kill</methodname>
|
|
<methodparam><type>resource</type><parameter>link</parameter></methodparam>
|
|
<methodparam><type>int</type><parameter>processid</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>&style.oop;</para>
|
|
<methodsynopsis>
|
|
<type>bool</type><methodname>maxdb::kill</methodname>
|
|
<methodparam><type>int</type><parameter>processid</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
This function is used to disconnect from a MaxDB server specified
|
|
by the <parameter>processid</parameter> parameter.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
&return.success;
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<example>
|
|
<title>&style.oop;</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
$maxdb = new maxdb("localhost", "MONA", "RED", "DEMODB");
|
|
|
|
/* check connection */
|
|
if (maxdb_connect_errno()) {
|
|
printf("Connect failed: %s\n", maxdb_connect_error());
|
|
exit();
|
|
}
|
|
|
|
/* determine our thread id */
|
|
$thread_id = $maxdb->thread_id;
|
|
|
|
/* Kill connection */
|
|
$maxdb->kill($thread_id);
|
|
|
|
/* This should produce an error */
|
|
if (!$maxdb->query("CREATE TABLE myCity LIKE City")) {
|
|
printf("Error: %s\n", $maxdb->error);
|
|
exit;
|
|
}
|
|
|
|
/* close connection */
|
|
$maxdb->close();
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
<example>
|
|
<title>&style.procedural;</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
$link = maxdb_connect("localhost", "MONA", "RED", "DEMODB");
|
|
|
|
/* check connection */
|
|
if (maxdb_connect_errno()) {
|
|
printf("Connect failed: %s\n", maxdb_connect_error());
|
|
exit();
|
|
}
|
|
|
|
/* determine our thread id */
|
|
$thread_id = maxdb_thread_id($link);
|
|
|
|
/* Kill connection */
|
|
maxdb_kill($link, $thread_id);
|
|
|
|
/* This should produce an error */
|
|
if (!maxdb_query($link, "CREATE TABLE myCity LIKE City")) {
|
|
printf("Error: %s\n", maxdb_error($link));
|
|
exit;
|
|
}
|
|
|
|
/* close connection */
|
|
maxdb_close($link);
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
&example.outputs.similar;
|
|
<screen>
|
|
<![CDATA[
|
|
Error: Session not connected
|
|
]]>
|
|
</screen>
|
|
</refsect1>
|
|
|
|
<refsect1 role="seealso">
|
|
&reftitle.seealso;
|
|
<para>
|
|
<simplelist>
|
|
<member><function>maxdb_thread_id</function></member>
|
|
</simplelist>
|
|
</para>
|
|
</refsect1>
|
|
|
|
</refentry>
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
Local variables:
|
|
mode: sgml
|
|
sgml-omittag:t
|
|
sgml-shorttag:t
|
|
sgml-minimize-attributes:nil
|
|
sgml-always-quote-attributes:t
|
|
sgml-indent-step:1
|
|
sgml-indent-data:t
|
|
indent-tabs-mode:nil
|
|
sgml-parent-document:nil
|
|
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
|
sgml-exposed-tags:nil
|
|
sgml-local-catalogs:nil
|
|
sgml-local-ecat-files:nil
|
|
End:
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
vim: et tw=78 syn=sgml
|
|
vi: ts=1 sw=1
|
|
-->
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
Local variables:
|
|
mode: sgml
|
|
sgml-omittag:t
|
|
sgml-shorttag:t
|
|
sgml-minimize-attributes:nil
|
|
sgml-always-quote-attributes:t
|
|
sgml-indent-step:1
|
|
sgml-indent-data:t
|
|
indent-tabs-mode:nil
|
|
sgml-parent-document:nil
|
|
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
|
sgml-exposed-tags:nil
|
|
sgml-local-catalogs:nil
|
|
sgml-local-ecat-files:nil
|
|
End:
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
vim: et tw=78 syn=sgml
|
|
vi: ts=1 sw=1
|
|
-->
|