2010-03-28 22:10:10 +00:00
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
2009-07-11 07:54:14 +00:00
|
|
|
<!-- $Revision$ -->
|
2007-06-20 22:25:43 +00:00
|
|
|
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.maxdb-character-set-name">
|
2007-01-29 16:56:02 +00:00
|
|
|
<refnamediv>
|
|
|
|
<refname>maxdb_character_set_name</refname>
|
2010-05-09 01:54:47 +00:00
|
|
|
<refname>maxdb::character_set_name</refname>
|
2007-01-29 16:56:02 +00:00
|
|
|
<refpurpose>Returns the default character set for the database connection</refpurpose>
|
|
|
|
</refnamediv>
|
2007-06-16 19:11:13 +00:00
|
|
|
|
|
|
|
<refsect1 role="description">
|
|
|
|
&reftitle.description;
|
2007-01-29 16:56:02 +00:00
|
|
|
<para>Procedural style:</para>
|
|
|
|
<methodsynopsis>
|
|
|
|
<type>string</type><methodname>maxdb_character_set_name</methodname>
|
|
|
|
<methodparam><type>resource</type><parameter>link</parameter></methodparam>
|
|
|
|
</methodsynopsis>
|
2010-05-09 01:54:47 +00:00
|
|
|
<para>&style.oop;</para>
|
2007-01-29 16:56:02 +00:00
|
|
|
<classsynopsis>
|
|
|
|
<ooclass><classname>maxdb</classname></ooclass>
|
|
|
|
<methodsynopsis>
|
|
|
|
<type>string</type>
|
|
|
|
<methodname>character_set_name</methodname>
|
|
|
|
<void />
|
|
|
|
</methodsynopsis>
|
|
|
|
</classsynopsis>
|
|
|
|
<para>
|
|
|
|
Returns the current character set for the database connection specified by the
|
|
|
|
<parameter>link</parameter> parameter.
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
2007-06-16 19:11:13 +00:00
|
|
|
|
|
|
|
<refsect1 role="returnvalues">
|
|
|
|
&reftitle.returnvalues;
|
2007-01-29 16:56:02 +00:00
|
|
|
<para>The default character set for the current connection, either ascii or unicode.</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
|
|
|
|
/* Open a connection */
|
|
|
|
$maxdb = new maxdb("localhost", "MONA", "RED", "DEMODB");
|
2007-01-29 16:56:02 +00:00
|
|
|
|
2005-03-08 16:39:06 +00:00
|
|
|
/* check connection */
|
|
|
|
if (maxdb_connect_errno()) {
|
|
|
|
printf("Connect failed: %s\n", maxdb_connect_error());
|
|
|
|
exit();
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Print current character set */
|
|
|
|
$charset = $maxdb->character_set_name();
|
|
|
|
printf ("Current character set is %s\n", $charset);
|
|
|
|
|
|
|
|
$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 (!$link) {
|
|
|
|
printf("Connect failed: %s\n", maxdb_connect_error());
|
|
|
|
exit();
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Print current character set */
|
|
|
|
$charset = maxdb_character_set_name($link);
|
|
|
|
printf ("Current character set is %s\n",$charset);
|
|
|
|
|
|
|
|
/* close connection */
|
|
|
|
maxdb_close($link);
|
|
|
|
?>
|
|
|
|
]]>
|
2007-01-29 16:56:02 +00:00
|
|
|
</programlisting>
|
|
|
|
</example>
|
2008-06-04 08:18:53 +00:00
|
|
|
&example.outputs.similar;
|
2007-01-29 16:56:02 +00:00
|
|
|
<screen>
|
2005-01-12 18:53:25 +00:00
|
|
|
<![CDATA[
|
|
|
|
Current character set is ascii
|
|
|
|
]]>
|
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_client_encoding</function></member>
|
|
|
|
<member><function>maxdb_real_escape_string</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
|
2009-09-25 07:04:39 +00:00
|
|
|
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
2005-01-12 18:53:25 +00:00
|
|
|
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
|
|
|
|
-->
|