File tree Expand file tree Collapse file tree 1 file changed +38
-2
lines changed
reference/uodbc/functions Expand file tree Collapse file tree 1 file changed +38
-2
lines changed Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" utf-8" ?>
22<!-- $Revision$ -->
3- <!-- EN-Revision: 1248359f65f6d21492d8959df4dbe7df2c0f3053 Maintainer: takagi Status: ready -->
3+ <!-- EN-Revision: 7990427082721b073c3b64967d945f71746b0b60 Maintainer: takagi Status: ready -->
4+ <!-- Credits: mumumu -->
45<refentry xml : id =" function.odbc-data-source" xmlns =" http://docbook.org/ns/docbook" >
56 <refnamediv >
67 <refname >odbc_data_source</refname >
7- <refpurpose >現在の接続についての情報を返す </refpurpose >
8+ <refpurpose >利用可能なDSNについての情報を返す </refpurpose >
89 </refnamediv >
910 <refsect1 role =" description" >
1011 &reftitle.description;
4748 &reftitle.returnvalues;
4849 <para >
4950 エラー時には &false; 、成功時には配列を返します。
51+ 最後の利用可能なDSNを取得した後は、&null; を返します。
5052 </para >
5153 </refsect1 >
54+
55+ <refsect1 role =" examples" >
56+ &reftitle.examples;
57+ <example xml : id =" odbc-data-source.example.basic" >
58+ <title >利用可能なDSNの一覧を表示する</title >
59+ <programlisting role =" php" >
60+ <![CDATA[
61+ <?php
62+ $conn = odbc_connect('dsn', 'user', 'pass');
63+ $dsn_info = odbc_data_source($conn, SQL_FETCH_FIRST);
64+ while ($dsn_info) {
65+ print_r($dsn_info);
66+ $dsn_info = odbc_data_source($conn, SQL_FETCH_NEXT);
67+ }
68+ ?>
69+ ]]>
70+ </programlisting >
71+ &example.outputs.similar;
72+ <screen >
73+ <![CDATA[
74+ Array
75+ (
76+ [server] => dsn
77+ [description] => ODBC Driver 17 for SQL Server
78+ )
79+ Array
80+ (
81+ [server] => other_dsn
82+ [description] => Microsoft Access Driver (*.mdb, *.accdb)
83+ )]]>
84+ </screen >
85+ </example >
86+ </refsect1 >
87+
5288</refentry >
5389
5490<!-- Keep this comment at the end of the file
You can’t perform that action at this time.
0 commit comments