2005-01-12 18:53:25 +00:00
|
|
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
2008-06-04 19:17:30 +00:00
|
|
|
<!-- $Revision: 1.6 $ -->
|
2007-06-20 22:25:43 +00:00
|
|
|
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.maxdb-get-host-info">
|
2007-01-29 16:56:02 +00:00
|
|
|
<refnamediv>
|
|
|
|
<refname>maxdb_get_host_info</refname>
|
|
|
|
<refname>maxdb->get_host_info</refname>
|
|
|
|
<refpurpose>Returns a string representing the type of connection used</refpurpose>
|
|
|
|
</refnamediv>
|
2007-06-16 19:11:13 +00:00
|
|
|
|
|
|
|
<refsect1 role="description">
|
|
|
|
&reftitle.description;
|
2007-01-29 16:56:02 +00:00
|
|
|
<para>Procdural style:</para>
|
|
|
|
<methodsynopsis>
|
|
|
|
<type>string</type><methodname>maxdb_get_host_info</methodname>
|
|
|
|
<methodparam><type>resource</type><parameter>link</parameter></methodparam>
|
|
|
|
</methodsynopsis>
|
|
|
|
<para>Object oriented style (property):</para>
|
|
|
|
<classsynopsis>
|
|
|
|
<ooclass><classname>maxdb</classname></ooclass>
|
|
|
|
<fieldsynopsis><type>string</type><varname>host_info</varname></fieldsynopsis>
|
|
|
|
</classsynopsis>
|
|
|
|
<para>
|
|
|
|
The <function>maxdb_get_host_info</function> function returns a string
|
|
|
|
describing the connection represented by the <parameter>link</parameter>
|
|
|
|
parameter is using.
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
2007-06-16 19:11:13 +00:00
|
|
|
|
|
|
|
<refsect1 role="returnvalues">
|
2007-01-29 16:56:02 +00:00
|
|
|
&reftitle.returnvalues;
|
|
|
|
<para>
|
|
|
|
A character string representing the server hostname and the connection type.
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
2007-06-16 19:11:13 +00:00
|
|
|
|
|
|
|
<refsect1 role="examples">
|
|
|
|
&reftitle.examples;
|
2007-01-29 16:56:02 +00:00
|
|
|
<example>
|
|
|
|
<title>Object oriented style</title>
|
|
|
|
<programlisting role="php">
|
2005-03-08 16:39:06 +00:00
|
|
|
<![CDATA[
|
|
|
|
<?php
|
|
|
|
$maxdb = new maxdb("localhost", "MONA", "RED", "DEMODB");
|
|
|
|
|
|
|
|
/* check connection */
|
|
|
|
if (maxdb_connect_errno()) {
|
|
|
|
printf("Connect failed: %s\n", maxdb_connect_error());
|
|
|
|
exit();
|
|
|
|
}
|
|
|
|
|
|
|
|
/* print host information */
|
|
|
|
printf("Host info: %s\n", $maxdb->host_info);
|
|
|
|
|
|
|
|
/* close connection */
|
|
|
|
$maxdb->close();
|
|
|
|
?>
|
|
|
|
]]>
|
2007-01-29 16:56:02 +00:00
|
|
|
</programlisting>
|
|
|
|
</example>
|
|
|
|
<example>
|
|
|
|
<title>Procedural style</title>
|
|
|
|
<programlisting role="php">
|
2005-01-12 18:53:25 +00:00
|
|
|
<![CDATA[
|
|
|
|
<?php
|
2005-03-08 16:39:06 +00:00
|
|
|
$link = maxdb_connect("localhost", "MONA", "RED", "DEMODB");
|
2005-01-12 18:53:25 +00:00
|
|
|
|
|
|
|
/* check connection */
|
|
|
|
if (maxdb_connect_errno()) {
|
|
|
|
printf("Connect failed: %s\n", maxdb_connect_error());
|
|
|
|
exit();
|
|
|
|
}
|
|
|
|
|
|
|
|
/* print host information */
|
|
|
|
printf("Host info: %s\n", maxdb_get_host_info($link));
|
|
|
|
|
|
|
|
/* close connection */
|
|
|
|
maxdb_close($link);
|
|
|
|
?>
|
|
|
|
]]>
|
2007-01-29 16:56:02 +00:00
|
|
|
</programlisting>
|
|
|
|
</example>
|
2008-06-04 19:17:30 +00:00
|
|
|
&example.outputs.similar;
|
2007-01-29 16:56:02 +00:00
|
|
|
<screen>
|
2005-01-12 18:53:25 +00:00
|
|
|
<![CDATA[
|
|
|
|
Host info: localhost
|
|
|
|
]]>
|
2007-01-29 16:56:02 +00:00
|
|
|
</screen>
|
|
|
|
</refsect1>
|
2007-06-16 19:11:13 +00:00
|
|
|
|
|
|
|
<refsect1 role="seealso">
|
|
|
|
&reftitle.seealso;
|
|
|
|
<para>
|
|
|
|
<simplelist>
|
|
|
|
<member><function>maxdb_get_proto_info</function></member>
|
|
|
|
</simplelist>
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
|
2007-01-29 16:56:02 +00:00
|
|
|
</refentry>
|
2005-01-12 18:53:25 +00:00
|
|
|
|
|
|
|
<!-- 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:"../../../../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
|
|
|
|
-->
|