php-doc-en/reference/mysqlnd_ms/functions/mysqlnd-ms-fabric-select-shard.xml
2014-03-10 13:46:11 +00:00

102 lines
2.5 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision: 322165 $ -->
<refentry xml:id="function.mysqlnd-ms-fabric-select-shard" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>mysqlnd_ms_fabric_select_shard</refname>
<refpurpose>Switch to shard</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>array</type>
<methodname>mysqlnd_ms_fabric_select_shard</methodname>
<methodparam><type>mixed</type><parameter>connection</parameter></methodparam>
<methodparam><type>mixed</type><parameter>table_name</parameter></methodparam>
<methodparam><type>mixed</type><parameter>shard_key</parameter></methodparam>
</methodsynopsis>
&warn.undocumented.func;
<para>
MySQL Fabric related.
</para>
<para>
Switch the connection to the shards responsible for the
given table name and shard key.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<variablelist>
<varlistentry>
<term><parameter>connection</parameter></term>
<listitem>
<para>
A MySQL connection handle obtained from any of the
connect functions of the <link linkend="ref.mysqli">mysqli</link>,
<link linkend="ref.mysql">mysql</link> or
<link linkend="ref.pdo-mysql">PDO_MYSQL</link> extensions.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>table_name</parameter></term>
<listitem>
<para>
The table name to ask Fabric about.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>shard_key</parameter></term>
<listitem>
<para>
The shard key to ask Fabric about.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
&false; on error. Otherwise, &true;
</para>
</refsect1>
<refsect1>
&reftitle.notes;
<note>
<para>
<function>mysqlnd_ms_fabric_select_shard</function> requires
PECL mysqlnd_ms &gt;> 1.6.0.
</para>
</note>
</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
-->