svn: /phpdoc/en/trunk/reference/cubrid/functions/ cubrid-connect-with-url.xml cubrid-connect.xml cubrid-get-query-timeout.xml

From: Date: Sat, 19 Nov 2011 06:29:15 +0000
Subject: svn: /phpdoc/en/trunk/reference/cubrid/functions/ cubrid-connect-with-url.xml cubrid-connect.xml cubrid-get-query-timeout.xml
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-9050@lists.php.net to get a copy of this message
cubrid Sat, 19 Nov 2011 06:29:15 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=319539 Log: Added examples about query timeout; Added the new_link parameter in cubrid_connect and cubrid_connect_with_url to make it more compatibility with mysql Changed paths: U phpdoc/en/trunk/reference/cubrid/functions/cubrid-connect-with-url.xml U phpdoc/en/trunk/reference/cubrid/functions/cubrid-connect.xml U phpdoc/en/trunk/reference/cubrid/functions/cubrid-get-query-timeout.xml Modified: phpdoc/en/trunk/reference/cubrid/functions/cubrid-connect-with-url.xml =================================================================== --- phpdoc/en/trunk/reference/cubrid/functions/cubrid-connect-with-url.xml 2011-11-19 04:59:56 UTC (rev 319538) +++ phpdoc/en/trunk/reference/cubrid/functions/cubrid-connect-with-url.xml 2011-11-19 06:29:15 UTC (rev 319539) @@ -14,6 +14,7 @@ <methodparam><type>string</type><parameter>conn_url</parameter></methodparam> <methodparam choice="opt"><type>string</type><parameter>userid</parameter></methodparam> <methodparam choice="opt"><type>string</type><parameter>passwd</parameter></methodparam> + <methodparam choice="opt"><type>bool</type><parameter>new_link</parameter></methodparam> </methodsynopsis> <para> The <function>cubrid_connect_with_url</function> function is used to @@ -22,11 +23,7 @@ enabled in CUBRID, you must specify the connection information of the standby server, which is used for failover when failure occurs, in the url string argument of this function. If the user name and password is not - given, then the "PUBLIC" connection will be made by default. If a second - call is made to <function>cubrid_connect</function> with the same - <parameter>conn_url</parameter>, and <parameter>userid</parameter> as an - existing connection, the existing connection will be returned unless you - pass. + given, then the "PUBLIC" connection will be made by default. </para> <para> &lt;url&gt; ::= CUBRID:&lt;host&gt;:&lt;db_name&gt;:&lt;db_user&gt;:&lt;db_password&gt;:[?&lt;properties&gt;] @@ -68,6 +65,17 @@ <term><parameter>passwd</parameter></term> <listitem><para>User password.</para></listitem> </varlistentry> + <varlistentry> + <term><parameter>new_link</parameter></term> + <listitem><para>If a second call is made to + <function>cubrid_connect_with_url</function> with the same arguments, + no new connection will be established, but instead, the connection + identifier of the already opened connection will be returned. The + <parameter>new_link</parameter> parameter modifies this behavior and + makes <function> cubrid_connect_with_url</function> always open a new + connection, even if <function> cubrid_connect_with_url</function> was + called before with the same parameters.</para></listitem> + </varlistentry> </variablelist> </para> </refsect1> Modified: phpdoc/en/trunk/reference/cubrid/functions/cubrid-connect.xml =================================================================== --- phpdoc/en/trunk/reference/cubrid/functions/cubrid-connect.xml 2011-11-19 04:59:56 UTC (rev 319538) +++ phpdoc/en/trunk/reference/cubrid/functions/cubrid-connect.xml 2011-11-19 06:29:15 UTC (rev 319539) @@ -16,17 +16,14 @@ <methodparam><type>string</type><parameter>dbname</parameter></methodparam> <methodparam choice="opt"><type>string</type><parameter>userid</parameter></methodparam> <methodparam choice="opt"><type>string</type><parameter>passwd</parameter></methodparam> + <methodparam choice="opt"><type>bool</type><parameter>new_link</parameter></methodparam> </methodsynopsis> <para> The <function>cubrid_connect</function> function is used to establish the environment for connecting to your server by using your server address, port number, database name, user name, and password. If the user name and password is not given, then the "PUBLIC" connection will be made by - default. If a second call is made to <function>cubrid_connect</function> - with the same <parameter>host</parameter>, <parameter>port</parameter>, - <parameter>dbname</parameter> and <parameter>userid</parameter> as an - existing connection, the existing connection will be returned unless you - pass. + default. </para> </refsect1> @@ -54,6 +51,17 @@ <term><parameter>passwd</parameter></term> <listitem><para>User password.</para></listitem> </varlistentry> + <varlistentry> + <term><parameter>new_link</parameter></term> + <listitem><para>If a second call is made to + <function>cubrid_connect</function> with the same arguments, no new + connection will be established, but instead, the connection identifier + of the already opened connection will be returned. The + <parameter>new_link</parameter> parameter modifies this behavior and + makes <function>cubrid_connect</function> always open a new connection, + even if <function>cubrid_connect</function> was called before with the + same parameters.</para></listitem> + </varlistentry> </variablelist> </para> </refsect1> Modified: phpdoc/en/trunk/reference/cubrid/functions/cubrid-get-query-timeout.xml =================================================================== --- phpdoc/en/trunk/reference/cubrid/functions/cubrid-get-query-timeout.xml 2011-11-19 04:59:56 UTC (rev 319538) +++ phpdoc/en/trunk/reference/cubrid/functions/cubrid-get-query-timeout.xml 2011-11-19 06:29:15 UTC (rev 319539) @@ -41,6 +41,44 @@ </para> </refsect1> + <refsect1 role="examples"> + &reftitle.examples; + <example> + <title><function>cubrid_get_query_timeout</function> example</title> + <programlisting role="php"> +<![CDATA[ +<?php + +$host = "localhost"; +$port = 33000; +$db = "demodb"; + +$conn = +cubrid_connect_with_url("CUBRID:$host:$port:$db:::?&login_timeout=50000&query_timeout=5000&disconnect_on_query_timeout=yes"); + +$req = cubrid_prepare($conn, "SELECT * FROM code"); + +$timeout = cubrid_get_query_timeout($req); +var_dump($timeout); + +cubrid_set_query_timeout($req, 1000); +$timeout = cubrid_get_query_timeout($req); +var_dump($timeout); + +cubrid_close($conn); +?> +]]> + </programlisting> + &example.outputs; + <screen> +<![CDATA[ +int(5000) +int(1000) +]]> + </screen> + </example> + </refsect1> + <refsect1 role="seealso"> &reftitle.seealso; <para>

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