php-doc-en/reference/pgsql/functions/pg-convert.xml
2003-07-16 09:20:01 +00:00

56 lines
2 KiB
XML

<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.6 $ -->
<!-- splitted from ./en/functions/pgsql.xml, last change in rev 1.80 -->
<refentry id='function.pg-convert'>
<refnamediv>
<refname>pg_convert</refname>
<refpurpose>
Convert associative array value into suitable for SQL statement.
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>array</type><methodname>pg_convert</methodname>
<methodparam><type>resource</type><parameter>connection</parameter></methodparam>
<methodparam><type>string</type><parameter>table_name</parameter></methodparam>
<methodparam><type>array</type><parameter>assoc_array</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>options</parameter></methodparam>
</methodsynopsis>
<para>
<function>pg_convert</function> checks and converts the values in
<literal>assoc_array</literal> into suitable values for use in a SQL
statement. Precondition for <function>pg_convert</function> is the existence
of a table <literal>table_name</literal> which has at least as many columns
as <literal>assoc_array</literal> has elements. The fieldnames as well as
the fieldvalues in <literal>table_name</literal> must match the indices and
values of <literal>assoc_array</literal>. Returns an array with the converted
values on success, &false; otherwise.
</para>
&warn.experimental.func;
<para>
See also <function>pg_meta_data</function>.
</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:"../../../../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
-->