mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-22 11:58:55 +00:00

Document false and null return types Cf. <https://news-web.php.net/php.doc.cvs/17645>. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@351730 c90b9560-bf6c-de11-be94-00142212c4b1
257 lines
7.1 KiB
XML
257 lines
7.1 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<!-- Generated by xml_proto.php v2.3. Found in /scripts directory of phpdoc. -->
|
|
<refentry xml:id="function.db2-client-info" xmlns="http://docbook.org/ns/docbook">
|
|
<refnamediv>
|
|
<refname>db2_client_info</refname>
|
|
<refpurpose>Returns an object with properties that describe the DB2 database client</refpurpose>
|
|
</refnamediv>
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<type>object</type><methodname>db2_client_info</methodname>
|
|
<methodparam><type>resource</type><parameter>connection</parameter></methodparam>
|
|
</methodsynopsis>
|
|
|
|
<para>
|
|
This function returns an object with read-only properties that return
|
|
information about the DB2 database client. The following table lists
|
|
the DB2 client properties:
|
|
<table>
|
|
<title>DB2 client properties</title>
|
|
<tgroup cols="3">
|
|
<thead>
|
|
<row>
|
|
<entry>Property name</entry>
|
|
<entry>Return type</entry>
|
|
<entry>Description</entry>
|
|
</row>
|
|
</thead>
|
|
<tbody>
|
|
<row>
|
|
<entry>APPL_CODEPAGE</entry>
|
|
<entry>int</entry>
|
|
<entry>The application code page.</entry>
|
|
</row>
|
|
<row>
|
|
<entry>CONN_CODEPAGE</entry>
|
|
<entry>int</entry>
|
|
<entry>The code page for the current connection.</entry>
|
|
</row>
|
|
<row>
|
|
<entry>DATA_SOURCE_NAME</entry>
|
|
<entry>string</entry>
|
|
<entry>The data source name (DSN) used to create the current connection
|
|
to the database.</entry>
|
|
</row>
|
|
<row>
|
|
<entry>DRIVER_NAME</entry>
|
|
<entry>string</entry>
|
|
<entry>The name of the library that implements the DB2 Call
|
|
Level Interface (CLI) specification.</entry>
|
|
</row>
|
|
<row>
|
|
<entry>DRIVER_ODBC_VER</entry>
|
|
<entry>string</entry>
|
|
<entry>The version of ODBC that the DB2 client supports. This returns a
|
|
string "MM.mm" where <varname>MM</varname> is the major version and
|
|
<varname>mm</varname> is the minor version. The DB2 client always
|
|
returns "03.51".
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry>DRIVER_VER</entry>
|
|
<entry>string</entry>
|
|
<entry>The version of the client, in the form of a string "MM.mm.uuuu" where
|
|
<varname>MM</varname> is the major version,
|
|
<varname>mm</varname> is the minor version,
|
|
and <varname>uuuu</varname> is the update. For example, "08.02.0001"
|
|
represents major version 8, minor version 2, update 1.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry>ODBC_SQL_CONFORMANCE</entry>
|
|
<entry>string</entry>
|
|
<entry>
|
|
<para>The level of ODBC SQL grammar supported by the client:
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term>MINIMUM</term>
|
|
<listitem>
|
|
<para>
|
|
Supports the minimum ODBC SQL grammar.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term>CORE</term>
|
|
<listitem>
|
|
<para>
|
|
Supports the core ODBC SQL grammar.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term>EXTENDED</term>
|
|
<listitem>
|
|
<para>
|
|
Supports extended ODBC SQL grammar.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry>ODBC_VER</entry>
|
|
<entry>string</entry>
|
|
<entry>The version of ODBC that the ODBC driver manager supports. This
|
|
returns a string "MM.mm.rrrr" where <varname>MM</varname> is the major
|
|
version, <varname>mm</varname> is the minor version, and
|
|
<varname>rrrr</varname> is the release. The DB2 client always returns
|
|
"03.01.0000".
|
|
</entry>
|
|
</row>
|
|
</tbody>
|
|
</tgroup>
|
|
</table>
|
|
</para>
|
|
|
|
</refsect1>
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>connection</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Specifies an active DB2 client connection.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</refsect1>
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
Returns an object on a successful call. Returns &false; on failure.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<!-- Use when ERRORS exist
|
|
<refsect1 role="errors">
|
|
&reftitle.errors;
|
|
<para>
|
|
When does this function throw E_* level errors, or exceptions?
|
|
</para>
|
|
</refsect1>
|
|
-->
|
|
|
|
<!-- Use when a CHANGELOG exists
|
|
<refsect1 role="changelog">
|
|
&reftitle.changelog;
|
|
<para>
|
|
<informaltable>
|
|
<tgroup cols="2">
|
|
<thead>
|
|
<row>
|
|
<entry>&Version;</entry>
|
|
<entry>&Description;</entry>
|
|
</row>
|
|
</thead>
|
|
<tbody>
|
|
<row>
|
|
<entry>Enter the PHP version of change here</entry>
|
|
<entry>Description of change</entry>
|
|
</row>
|
|
</tbody>
|
|
</tgroup>
|
|
</informaltable>
|
|
</para>
|
|
</refsect1>
|
|
-->
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title>A <function>db2_client_info</function> example</title>
|
|
<para>
|
|
To retrieve information about the client, you must pass a valid
|
|
database connection resource to <function>db2_client_info</function>.
|
|
</para>
|
|
<programlisting role="php">
|
|
<![CDATA[<?php
|
|
$conn = db2_connect( 'SAMPLE', 'db2inst1', 'ibmdb2' );
|
|
$client = db2_client_info( $conn );
|
|
|
|
if ($client) {
|
|
echo "DRIVER_NAME: "; var_dump( $client->DRIVER_NAME );
|
|
echo "DRIVER_VER: "; var_dump( $client->DRIVER_VER );
|
|
echo "DATA_SOURCE_NAME: "; var_dump( $client->DATA_SOURCE_NAME );
|
|
echo "DRIVER_ODBC_VER: "; var_dump( $client->DRIVER_ODBC_VER );
|
|
echo "ODBC_VER: "; var_dump( $client->ODBC_VER );
|
|
echo "ODBC_SQL_CONFORMANCE: "; var_dump( $client->ODBC_SQL_CONFORMANCE );
|
|
echo "APPL_CODEPAGE: "; var_dump( $client->APPL_CODEPAGE );
|
|
echo "CONN_CODEPAGE: "; var_dump( $client->CONN_CODEPAGE );
|
|
}
|
|
else {
|
|
echo "Error retrieving client information.
|
|
Perhaps your database connection was invalid.";
|
|
}
|
|
db2_close($conn);
|
|
|
|
?>]]>
|
|
</programlisting>
|
|
&example.outputs;
|
|
<screen>
|
|
<![CDATA[
|
|
DRIVER_NAME: string(8) "libdb2.a"
|
|
DRIVER_VER: string(10) "08.02.0001"
|
|
DATA_SOURCE_NAME: string(6) "SAMPLE"
|
|
DRIVER_ODBC_VER: string(5) "03.51"
|
|
ODBC_VER: string(10) "03.01.0000"
|
|
ODBC_SQL_CONFORMANCE: string(8) "EXTENDED"
|
|
APPL_CODEPAGE: int(819)
|
|
CONN_CODEPAGE: int(819)
|
|
]]>
|
|
</screen>
|
|
</example>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="seealso">
|
|
&reftitle.seealso;
|
|
<para>
|
|
<simplelist>
|
|
<member><function>db2_server_info</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
|
|
-->
|