svn: /phpdoc/en/trunk/reference/cubrid/ cubridmysql/cubrid-affected-rows.xml functions/cubrid-affected-rows.xml

From: Date: Tue, 21 Feb 2012 03:05:16 +0000
Subject: svn: /phpdoc/en/trunk/reference/cubrid/ cubridmysql/cubrid-affected-rows.xml functions/cubrid-affected-rows.xml
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-9628@lists.php.net to get a copy of this message
cubrid Tue, 21 Feb 2012 03:05:16 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=323400 Log: Modified cubrid-affected-rows, referenced to APIS-106 Changed paths: A phpdoc/en/trunk/reference/cubrid/cubridmysql/cubrid-affected-rows.xml D phpdoc/en/trunk/reference/cubrid/functions/cubrid-affected-rows.xml Added: phpdoc/en/trunk/reference/cubrid/cubridmysql/cubrid-affected-rows.xml =================================================================== --- phpdoc/en/trunk/reference/cubrid/cubridmysql/cubrid-affected-rows.xml (rev 0) +++ phpdoc/en/trunk/reference/cubrid/cubridmysql/cubrid-affected-rows.xml 2012-02-21 03:05:16 UTC (rev 323400) @@ -0,0 +1,114 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- $Revision: 321057 $ --> + +<refentry xml:id="function.cubrid-affected-rows" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> + <refnamediv> + <refname>cubrid_affected_rows</refname> + <refpurpose>Return the number of rows affected by the last SQL statement</refpurpose> + </refnamediv> + + <refsect1 role="description"> + &reftitle.description; + <methodsynopsis> + <type>int</type><methodname>cubrid_affected_rows</methodname> + <methodparam choice="opt"><type>resource</type><parameter>conn_identifier</parameter></methodparam> + </methodsynopsis> + <para> + The <function>cubrid_affected_rows</function> function is used to get the + number of rows affected by the SQL statement (INSERT, DELETE, UPDATE). + </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>conn_identifier</parameter></term> + <listitem><para>The CUBRID connection. If the connection identifier is not + specified, the last link opend by <function>cubrid_connect</function> is + assumed.</para></listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + Number of rows affected by the SQL statement, when process is successful. + </para> + <para> + -1, when SQL statement is not INSERT, DELETE or UPDATE. + </para> + <para> + &false;, when the request identifier is not specified, and there is no last + request. + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; + <example> + <title><function>cubrid_affected_rows</function> example</title> + <programlisting role="php"> +<![CDATA[ +<?php +$conn = cubrid_connect("localhost", 33000, "demodb"); + +@cubrid_execute($conn, "DROP TABLE cubrid_test"); +cubrid_execute($conn, "CREATE TABLE cubrid_test (t varchar)"); + +for ($i = 0; $i < 5; $i++) { + cubrid_execute($conn, "INSERT INTO cubrid_test(t) VALUES('cubrid_test')"); +} + +cubrid_execute($conn, "DELETE FROM cubrid_test"); + +$affected_num = cubrid_affected_rows(); +printf("Rows deleted: %d\n", $affected_num); + +cubrid_disconnect($conn); +?> +]]> + </programlisting> + &example.outputs; + <screen> +<![CDATA[ +Rows deleted: 5 +]]> + </screen> + </example> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>cubrid_execute</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 +--> Deleted: phpdoc/en/trunk/reference/cubrid/functions/cubrid-affected-rows.xml =================================================================== --- phpdoc/en/trunk/reference/cubrid/functions/cubrid-affected-rows.xml 2012-02-21 02:58:25 UTC (rev 323399) +++ phpdoc/en/trunk/reference/cubrid/functions/cubrid-affected-rows.xml 2012-02-21 03:05:16 UTC (rev 323400) @@ -1,113 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- $Revision$ --> - -<refentry xml:id="function.cubrid-affected-rows" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> - <refnamediv> - <refname>cubrid_affected_rows</refname> - <refpurpose>Return the number of rows affected by the last SQL statement</refpurpose> - </refnamediv> - - <refsect1 role="description"> - &reftitle.description; - <methodsynopsis> - <type>int</type><methodname>cubrid_affected_rows</methodname> - <methodparam choice="opt"><type>resource</type><parameter>result</parameter></methodparam> - </methodsynopsis> - <para> - The <function>cubrid_affected_rows</function> function is used to get the - number of rows affected by the SQL statement (INSERT, DELETE, UPDATE). - </para> - </refsect1> - - <refsect1 role="parameters"> - &reftitle.parameters; - <para> - <variablelist> - <varlistentry> - <term><parameter>result</parameter></term> - <listitem><para>Result. If the result is not specified, the last result is - assumed.</para></listitem> - </varlistentry> - </variablelist> - </para> - </refsect1> - - <refsect1 role="returnvalues"> - &reftitle.returnvalues; - <para> - Number of rows affected by the SQL statement, when process is successful. - </para> - <para> - -1, when SQL statement is not INSERT, DELETE or UPDATE. - </para> - <para> - &false;, when the request identifier is not specified, and there is no last - request. - </para> - </refsect1> - - <refsect1 role="examples"> - &reftitle.examples; - <example> - <title><function>cubrid_affected_rows</function> example</title> - <programlisting role="php"> -<![CDATA[ -<?php -$conn = cubrid_connect("localhost", 33000, "demodb"); - -@cubrid_execute($conn, "DROP TABLE cubrid_test"); -cubrid_execute($conn, "CREATE TABLE cubrid_test (t varchar)"); - -for ($i = 0; $i < 5; $i++) { - cubrid_execute($conn, "INSERT INTO cubrid_test(t) VALUES('cubrid_test')"); -} - -cubrid_execute($conn, "DELETE FROM cubrid_test"); - -$affected_num = cubrid_affected_rows(); -printf("Rows deleted: %d\n", $affected_num); - -cubrid_disconnect($conn); -?> -]]> - </programlisting> - &example.outputs; - <screen> -<![CDATA[ -Rows deleted: 5 -]]> - </screen> - </example> - </refsect1> - - <refsect1 role="seealso"> - &reftitle.seealso; - <para> - <simplelist> - <member><function>cubrid_execute</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 --->

« previous php.doc.cvs (#9628) next »