mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
add cubrid documentation
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@301868 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
0380452c2a
commit
0cc80e227c
49 changed files with 4946 additions and 0 deletions
76
reference/cubrid/book.developer.xml
Normal file
76
reference/cubrid/book.developer.xml
Normal file
|
@ -0,0 +1,76 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V5.0//EN"
|
||||
"{PATH_TO_DOCBASE}/docbook/docbook-xml/docbook.dtd" [
|
||||
|
||||
<!-- $Revision$ -->
|
||||
<!-- We use xhtml entities all over the place -->
|
||||
<!ENTITY % xhtml-lat1 SYSTEM "{PATH_TO_DOCBASE}/entities/ISO/xhtml1-lat1.ent">
|
||||
<!ENTITY % xhtml-symbol SYSTEM "{PATH_TO_DOCBASE}/entities/ISO/xhtml1-symbol.ent">
|
||||
<!ENTITY % xhtml-special SYSTEM "{PATH_TO_DOCBASE}/entities/ISO/xhtml1-special.ent">
|
||||
<!ENTITY % isopub SYSTEM "{PATH_TO_DOCBASE}/entities/ISO/isopub.ent">
|
||||
%xhtml-lat1;
|
||||
%xhtml-symbol;
|
||||
%xhtml-special;
|
||||
%isopub;
|
||||
|
||||
<!-- Fallback to English definitions and snippets (in case of missing translation) -->
|
||||
<!ENTITY % language-defs.default SYSTEM "{PATH_TO_DOC}/language-defs.ent">
|
||||
<!ENTITY % language-snippets.default SYSTEM "{PATH_TO_DOC}/language-snippets.ent">
|
||||
<!ENTITY % extensions.default SYSTEM "{PATH_TO_DOC}/extensions.ent">
|
||||
|
||||
%language-defs.default;
|
||||
%extensions.default;
|
||||
%language-snippets.default;
|
||||
|
||||
<!-- All global entities for the XML files -->
|
||||
<!ENTITY % global.entities SYSTEM "{PATH_TO_DOCBASE}/entities/global.ent">
|
||||
|
||||
<!-- These are language independent -->
|
||||
<!ENTITY % frontpage.entities SYSTEM "{PATH_TO_DOC}/contributors.ent">
|
||||
<!ENTITY % file.entities SYSTEM "{PATH_TO_DOCBASE}/entities/file-entities.ent">
|
||||
|
||||
<!-- Include all external DTD parts defined previously -->
|
||||
%global.entities;
|
||||
%file.entities;
|
||||
%frontpage.entities;
|
||||
]>
|
||||
|
||||
<book xml:id="book.cubrid" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:lang="en">
|
||||
<title>Cubrid</title>
|
||||
<titleabbrev>Cubrid</titleabbrev>
|
||||
|
||||
<preface xml:id="intro.cubrid">
|
||||
&reftitle.intro;
|
||||
<para>
|
||||
|
||||
</para>
|
||||
</preface>
|
||||
|
||||
&reference.cubrid.setup;
|
||||
&reference.cubrid.constants;
|
||||
&reference.cubrid.examples;
|
||||
&reference.cubrid.reference;
|
||||
|
||||
</book>
|
||||
|
||||
<!-- 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
|
||||
-->
|
||||
|
45
reference/cubrid/book.xml
Normal file
45
reference/cubrid/book.xml
Normal file
|
@ -0,0 +1,45 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<book xml:id="book.cubrid" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>Cubrid</title>
|
||||
<titleabbrev>Cubrid</titleabbrev>
|
||||
|
||||
<preface xml:id="intro.cubrid">
|
||||
&reftitle.intro;
|
||||
<para>
|
||||
These functions allow you to access CUBRID database servers. More information about CUBRID can be found at <link xlink:href="&url.cubrid;">CUBRID</link>.
|
||||
</para>
|
||||
<para>
|
||||
Documentation for CUBRID can be found at <link xlink:href="&url.cubrid.docs;">CUBRID Documentation</link>.
|
||||
</para>
|
||||
|
||||
</preface>
|
||||
|
||||
&reference.cubrid.setup;
|
||||
&reference.cubrid.constants;
|
||||
&reference.cubrid.examples;
|
||||
&reference.cubrid.reference;
|
||||
|
||||
</book>
|
||||
|
||||
<!-- 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
|
||||
-->
|
34
reference/cubrid/configure.xml
Normal file
34
reference/cubrid/configure.xml
Normal file
|
@ -0,0 +1,34 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<section xml:id="cubrid.installation" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
&reftitle.install;
|
||||
|
||||
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
<!-- 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
|
||||
-->
|
362
reference/cubrid/constants.xml
Normal file
362
reference/cubrid/constants.xml
Normal file
|
@ -0,0 +1,362 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<appendix xml:id="cubrid.constants" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
&reftitle.constants;
|
||||
&extension.constants;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>CUBRID_INCLUDE_OID</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Is used to determine whether to get OID after query execution.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>CUBRID_ASYNC</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Is used to execute the query in asynchronous mode.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>CUBRID_NUM</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Is used to get the query result as a numeric array (0-default).
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>CUBRID_ASSOC</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Is used to get the query result as an associative array.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>CUBRID_BOTH</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Is used to get the query result as both numeric and associative arrays (default value).
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>CUBRID_OBJECT</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Is used to get the query result an object that has the attribute whose name is the same as the column name.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>CUBRID_CURSOR_FIRST</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Is used to move the current cursor to the first position in the result.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>CUBRID_CURSOR_CURRENT</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Is used to move the current cursor as a default value if the origin is not specified.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>CUBRID_CURSOR_LAST</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Is used to move the current cursor to the last position in the result.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>CUBRID_CURSOR_SUCCESS</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Is the returned value of <function>cubrid_move_cursor</function> function in case of success.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>CUBRID_NO_MORE_DATA</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Is the returned value of <function>cubrid_move_cursor</function> function in case of failure.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>CUBRID_CURSOR_ERROR</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Is the returned value of <function>cubrid_move_cursor</function> function in case of failure.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>CUBRID_SCH_CLASS</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Is a schema type used for <function>cubrid_schema</function> function.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>CUBRID_SCH_VCLASS</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Is a schema type used for <function>cubrid_schema</function> function.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>CUBRID_SCH_QUERY_SPEC</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Is a schema type used for <function>cubrid_schema</function> function.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>CUBRID_SCH_ATTRIBUTE</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Is a schema type used for <function>cubrid_schema</function> function.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>CUBRID_SCH_CLASS_ATTRIBUTE</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Is a schema type used for <function>cubrid_schema</function> function.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>CUBRID_SCH_METHOD</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Is a schema type used for <function>cubrid_schema</function> function.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>CUBRID_SCH_CLASS_METHOD</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Is a schema type used for <function>cubrid_schema</function> function.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>CUBRID_SCH_METHOD_FILE</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Is a schema type used for <function>cubrid_schema</function> function.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>CUBRID_SCH_SUPERCLASS</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Is a schema type used for <function>cubrid_schema</function> function.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>CUBRID_SCH_SUBCLASS</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Is a schema type used for <function>cubrid_schema</function> function.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>CUBRID_SCH_CONSTRAINT</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Is a schema type used for <function>cubrid_schema</function> function.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>CUBRID_SCH_TRIGGER</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Is a schema type used for <function>cubrid_schema</function> function.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>CUBRID_SCH_CLASS_PRIVILEGE</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Is a schema type used for <function>cubrid_schema</function> function.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>CUBRID_SCH_ATTR_PRIVILEGE</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Is a schema type used for <function>cubrid_schema</function> function.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>CUBRID_FACILITY_DBMS</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Is the facility code of the occurred error code when using <function>cubrid_error_code_facility</function> function.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>CUBRID_FACILITY_CAS</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Is the facility code of the occurred error code when using <function>cubrid_error_code_facility</function> function.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>CUBRID_FACILITY_CCI</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Is the facility code of the occurred error code when using <function>cubrid_error_code_facility</function> function.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>CUBRID_FACILITY_CLIENT</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Is the facility code of the occurred error code when using <function>cubrid_error_code_facility</function> function.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</appendix>
|
||||
|
||||
<!-- 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
|
||||
-->
|
40
reference/cubrid/entities.functions.xml
Normal file
40
reference/cubrid/entities.functions.xml
Normal file
|
@ -0,0 +1,40 @@
|
|||
&reference.cubrid.functions.cubrid-affected-rows;
|
||||
&reference.cubrid.functions.cubrid-bind;
|
||||
&reference.cubrid.functions.cubrid-close-prepare;
|
||||
&reference.cubrid.functions.cubrid-close-request;
|
||||
&reference.cubrid.functions.cubrid-col-get;
|
||||
&reference.cubrid.functions.cubrid-col-size;
|
||||
&reference.cubrid.functions.cubrid-column-names;
|
||||
&reference.cubrid.functions.cubrid-column-types;
|
||||
&reference.cubrid.functions.cubrid-commit;
|
||||
&reference.cubrid.functions.cubrid-connect;
|
||||
&reference.cubrid.functions.cubrid-current-oid;
|
||||
&reference.cubrid.functions.cubrid-disconnect;
|
||||
&reference.cubrid.functions.cubrid-drop;
|
||||
&reference.cubrid.functions.cubrid-error-code-facility;
|
||||
&reference.cubrid.functions.cubrid-error-code;
|
||||
&reference.cubrid.functions.cubrid-error-msg;
|
||||
&reference.cubrid.functions.cubrid-execute;
|
||||
&reference.cubrid.functions.cubrid-fetch;
|
||||
&reference.cubrid.functions.cubrid-get-class-name;
|
||||
&reference.cubrid.functions.cubrid-get;
|
||||
&reference.cubrid.functions.cubrid-is-instance;
|
||||
&reference.cubrid.functions.cubrid-load-from-glo;
|
||||
&reference.cubrid.functions.cubrid-lock-read;
|
||||
&reference.cubrid.functions.cubrid-lock-write;
|
||||
&reference.cubrid.functions.cubrid-move-cursor;
|
||||
&reference.cubrid.functions.cubrid-new-glo;
|
||||
&reference.cubrid.functions.cubrid-num-cols;
|
||||
&reference.cubrid.functions.cubrid-num-rows;
|
||||
&reference.cubrid.functions.cubrid-prepare;
|
||||
&reference.cubrid.functions.cubrid-put;
|
||||
&reference.cubrid.functions.cubrid-rollback;
|
||||
&reference.cubrid.functions.cubrid-save-to-glo;
|
||||
&reference.cubrid.functions.cubrid-schema;
|
||||
&reference.cubrid.functions.cubrid-send-glo;
|
||||
&reference.cubrid.functions.cubrid-seq-drop;
|
||||
&reference.cubrid.functions.cubrid-seq-insert;
|
||||
&reference.cubrid.functions.cubrid-seq-put;
|
||||
&reference.cubrid.functions.cubrid-set-add;
|
||||
&reference.cubrid.functions.cubrid-set-drop;
|
||||
&reference.cubrid.functions.cubrid-version;
|
153
reference/cubrid/examples.xml
Normal file
153
reference/cubrid/examples.xml
Normal file
|
@ -0,0 +1,153 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<chapter xml:id="cubrid.examples" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
&reftitle.examples;
|
||||
<para>The following is a simple example that establishes a connection between PHP and CUBRID. This section will cover the most basic and notable features. The following code required to connect to CUBRID database, which means CUBRID Server and CUBRID Broker have to be running.</para>
|
||||
<para>The example below uses the demodb database as an examples. By default it is created during the installation. Make sure it has been created.</para>
|
||||
|
||||
|
||||
<example>
|
||||
<title>Example of Data Retrieval</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv='content-type' content='text/html; charset=euc-kr'>
|
||||
</head>
|
||||
<body>
|
||||
<center>
|
||||
<table border=2>
|
||||
<?
|
||||
// Set server information for CUBRID connection. host_ip is the IP
|
||||
// address where the CUBRID Broker is installed (localhost in this
|
||||
// example), and host_port is the port number of the CUBRID Broker.
|
||||
// The port number is the default given during the installation.
|
||||
// For details, see "Administrator's Guide."
|
||||
$host_ip = "localhost";
|
||||
$host_port = 33000;
|
||||
$db_name = "demodb";
|
||||
// Connect to CUBRID Server. Do not make the actual connection, but
|
||||
// only retain the connection information. The reason for not making
|
||||
// the actual connection is to handle transaction more efficiently
|
||||
// in the 3-tier architecture.
|
||||
$cubrid_con = @cubrid_connect($host_ip, $host_port, $db_name);
|
||||
|
||||
if (!$cubrid_con) {
|
||||
echo "Database Connection Error";
|
||||
exit;
|
||||
}
|
||||
?>
|
||||
<?
|
||||
$sql = "select sports, count(players) as players from event group by sports";
|
||||
// Request the CUBRID Server for the results of the SQL statement.
|
||||
// Now make the actual connection to the CUBRID Server.
|
||||
$result = cubrid_execute($cubrid_con, $sql);
|
||||
|
||||
if ($result) {
|
||||
// Get the column names from the result set created by the SQL query.
|
||||
$columns = cubrid_column_names($result);
|
||||
// Get the number of columns in the result set created by the SQL query.
|
||||
$num_fields = cubrid_num_cols($result);
|
||||
// List the column names of the result set on the screen.
|
||||
echo("<tr>");
|
||||
|
||||
while (list($key, $colname) = each($columns)) {
|
||||
echo("<td align=center>$colname</td>");
|
||||
}
|
||||
|
||||
echo("</tr>");
|
||||
|
||||
// Get the results from the result set.
|
||||
while ($row = cubrid_fetch($result)) {
|
||||
echo("<tr>");
|
||||
|
||||
for ($i = 0; $i < $num_fields; $i++) {
|
||||
echo("<td align=center>");
|
||||
echo($row[$i]);
|
||||
echo("</td>");
|
||||
}
|
||||
|
||||
echo("</tr>");
|
||||
}
|
||||
}
|
||||
// The PHP module in the CUBRID runs in a 3-tier architecture. Even when
|
||||
// calling SELECT for transaction processing, it is processed as a part
|
||||
// of the transaction. Therefore, the transaction needs to be rolled back
|
||||
// by calling commit or rollback even though SELECT was called for smooth
|
||||
// performance.
|
||||
cubrid_commit($cubrid_con);
|
||||
cubrid_disconnect($cubrid_con);
|
||||
?>
|
||||
</body>
|
||||
</html>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
<example>
|
||||
<title>Example of Data Insertion</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv='content-type' content='text/html; charset=euc- kr'>
|
||||
</head>
|
||||
<body>
|
||||
<center>
|
||||
<table border=2>
|
||||
<?
|
||||
$host_ip = "localhost";
|
||||
$host_port = 33000;
|
||||
$db_name = "demodb";
|
||||
$cubrid_con = @cubrid_connect($host_ip, $host_port, $db_name);
|
||||
|
||||
if (!$cubrid_con) {
|
||||
echo "Database Connection Error";
|
||||
exit;
|
||||
}
|
||||
?>
|
||||
<?
|
||||
$sql = "insert into olympic (host_year,host_nation,host_city,"
|
||||
. "opening_date,closing_date) values (2008, 'China', 'Beijing',"
|
||||
. "to_date('08-08-2008','mm-dd- yyyy'),to_date('08-24-2008','mm-dd-yyyy')) ;"
|
||||
$result = cubrid_execute($cubrid_con, $sql);
|
||||
if ($result) {
|
||||
// Handled successfully, so commit.
|
||||
cubrid_commit($cubrid_con);
|
||||
echo("Inserted successfully ");
|
||||
} else {
|
||||
// Error occurred, so the error message is output and rollback is called.
|
||||
echo(cubrid_error_msg());
|
||||
cubrid_rollback($cubrid_con);
|
||||
}
|
||||
cubrid_disconnect($cubrid_con);
|
||||
?>
|
||||
</body>
|
||||
</html>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
|
||||
|
||||
</chapter>
|
||||
|
||||
<!-- 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
|
||||
-->
|
92
reference/cubrid/functions/cubrid-affected-rows.xml
Normal file
92
reference/cubrid/functions/cubrid-affected-rows.xml
Normal file
|
@ -0,0 +1,92 @@
|
|||
<?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>Get number of affected rows in previous Cubrid operation</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>cubrid_affected_rows</methodname>
|
||||
<methodparam><type>int</type><parameter>req_handle</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
The <function>cubrid_affected_rows</function> function is used to get the number of rows affected by the SQL sentence (INSERT, DELETE, UPDATE).
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>req_handle</parameter></term>
|
||||
<listitem><para>Request handle.</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Number of rows affected by the SQL sentence, when process is successful.
|
||||
</para>
|
||||
<para>
|
||||
-1, when process is unsuccessful.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title><function>cubrid_affected_rows</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$req = cubrid_execute ($con, "delete from person where name like ’j%’ ");
|
||||
if ($req) {
|
||||
$row_count = cubrid_affected_rows ($req);
|
||||
echo $row_count;
|
||||
cubrid_close_request ($req);
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</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
|
||||
-->
|
115
reference/cubrid/functions/cubrid-bind.xml
Normal file
115
reference/cubrid/functions/cubrid-bind.xml
Normal file
|
@ -0,0 +1,115 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.cubrid-bind" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>cubrid_bind</refname>
|
||||
<refpurpose>Is used to bind values</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>cubrid_bind</methodname>
|
||||
<methodparam><type>int</type><parameter>req_handle</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>bind_index</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>bind_value</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>string</type><parameter>bind_value_type</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
The <function>cubrid_bind</function> function is used to bind values in a <function>cubrid_prepare</function> variable, a various types in PHP and corresponding types in SQL.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>req_handle</parameter></term>
|
||||
<listitem><para>Request handle as a result of <function>cubrid_prepare.</function></para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>bind_index</parameter></term>
|
||||
<listitem><para>Index for binding.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>bind_value</parameter></term>
|
||||
<listitem><para>Actual value for binding.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>bind_index</parameter></term>
|
||||
<listitem><para>A type of the value to bind. (It is omitted by default. Thus, system internally converts and matches the corresponding types if it is omitted. However, you need to specify the exact type of the value as an argument when they are either NCHAR or BIT).</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&true;, when process is successful.
|
||||
</para>
|
||||
<para>
|
||||
&false;, when process is unsuccessful.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title><function>cubrid_bind</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$con = cubrid_connect ("dbsvr.cubrid.com", 12345, "demodb");
|
||||
if ($con) {
|
||||
$sql = "insert into tbl values ( ?,?,?)";
|
||||
$req = cubrid_prepare( $con, $sql, CUBRID_INCLUDE_OID );
|
||||
$i = 0;
|
||||
while ( $i < 2 ) {
|
||||
$res = cubrid_bind( $req, 1, "1", "NUMBER");
|
||||
$res = cubrid_bind( $req, 2, "2");
|
||||
$res = cubrid_bind( $req, 3, "04:22:34 PM 08/07/2007");
|
||||
$res = cubrid_execute( $req );
|
||||
$i = $i + 1;
|
||||
}}
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>cubrid_execute</function></member>
|
||||
<member><function>cubrid_prepare</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
|
||||
-->
|
100
reference/cubrid/functions/cubrid-close-prepare.xml
Normal file
100
reference/cubrid/functions/cubrid-close-prepare.xml
Normal file
|
@ -0,0 +1,100 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.cubrid-close-prepare" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>cubrid_close_prepare</refname>
|
||||
<refpurpose>Closes the request handle </refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>cubrid_close_prepare</methodname>
|
||||
<methodparam><type>int</type><parameter>req_handle</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
The <function>cubrid_close_prepare</function> function closes the request handle given by the <parameter>req_handle</parameter> argument, and releases the memory region related to the handle.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>req_handle</parameter></term>
|
||||
<listitem><para>Request handle.</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&true;, when process is successful.
|
||||
</para>
|
||||
<para>
|
||||
&false;, when process is unsuccessful.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title><function>cubrid_close_prepare</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$con = cubrid_connect ("dbsvr.cubrid.com", 12345, "demodb");
|
||||
if ($con) {
|
||||
echo "connected successfully";
|
||||
$req = cubrid_execute ( $con, "select * from members",
|
||||
CUBRID_INCLUDE_OID | CUBRID_ASYNC);
|
||||
if ($req) {
|
||||
while ( list ($id, $name) = cubrid_fetch ($req) ){
|
||||
echo $id;
|
||||
echo $name;
|
||||
}
|
||||
cubrid_close_prepare($re1);
|
||||
}
|
||||
cubrid_discommect($con);
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</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
|
||||
-->
|
100
reference/cubrid/functions/cubrid-close-request.xml
Normal file
100
reference/cubrid/functions/cubrid-close-request.xml
Normal file
|
@ -0,0 +1,100 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.cubrid-close-request" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>cubrid_close_request</refname>
|
||||
<refpurpose>Closes the request handle </refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>cubrid_close_request</methodname>
|
||||
<methodparam><type>int</type><parameter>req_handle</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
The <function>cubrid_close_request</function> function closes the request handle given by the <parameter>req_handle</parameter> argument, and releases the memory region related to the handle.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>req_handle</parameter></term>
|
||||
<listitem><para>Request handle.</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&true;, when process is successful.
|
||||
</para>
|
||||
<para>
|
||||
&false;, when process is unsuccessful.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title><function>cubrid_close_request</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$con = cubrid_connect ("dbsvr.cubrid.com", 12345, "demodb");
|
||||
if ($con) {
|
||||
echo "connected successfully";
|
||||
$req = cubrid_execute ( $con, "select * from members",
|
||||
CUBRID_INCLUDE_OID | CUBRID_ASYNC);
|
||||
if ($req) {
|
||||
while ( list ($id, $name) = cubrid_fetch ($req) ){
|
||||
echo $id;
|
||||
echo $name;
|
||||
}
|
||||
cubrid_close_request($re1);
|
||||
}
|
||||
cubrid_discommect($con);
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</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
|
||||
-->
|
93
reference/cubrid/functions/cubrid-col-get.xml
Normal file
93
reference/cubrid/functions/cubrid-col-get.xml
Normal file
|
@ -0,0 +1,93 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.cubrid-col-get" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>cubrid_col_get</refname>
|
||||
<refpurpose>Is used to get contents of the elements</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>cubrid_col_get</methodname>
|
||||
<methodparam><type>int</type><parameter>conn_handle</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>oid</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>attr_name</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
The <function>cubrid_col_get</function> function is used to get contents of the elements of the collection type (set, multiset, sequence) attribute you requested as an array.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>conn_handle</parameter></term>
|
||||
<listitem><para>Connection handle.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>oid</parameter></term>
|
||||
<listitem><para>Oid of the instance that you want to read.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>attr_name</parameter></term>
|
||||
<listitem><para>Attribute name that you want to read from the instance.</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Array (0-based numerical array) containing the elements you requested, when process is successful;
|
||||
</para>
|
||||
<para>
|
||||
&false; (to distinguish the error from the situation of attribute having empty collection or NULL, in case of error, a warning message is shown; in such case you can check the error by using <function>cubrid_error_code</function>), when process is unsuccessful.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title><function>cubrid_col_get</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$elem_array = cubrid_col_get ($con, $oid, "tel");
|
||||
while (list ($key, $val) = each ($elem_array)) {
|
||||
echo "tel: $val\n";
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</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
|
||||
-->
|
90
reference/cubrid/functions/cubrid-col-size.xml
Normal file
90
reference/cubrid/functions/cubrid-col-size.xml
Normal file
|
@ -0,0 +1,90 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.cubrid-col-size" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>cubrid_col_size</refname>
|
||||
<refpurpose>Is used to get the number of elements</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>cubrid_col_size</methodname>
|
||||
<methodparam><type>int</type><parameter>conn_handle</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>oid</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>attr_name</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
The <function>cubrid_col_size</function> function is used to get the number of elements in a collection type (set, multiset, sequence) attribute.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>conn_handle</parameter></term>
|
||||
<listitem><para>Connection handle.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>oid</parameter></term>
|
||||
<listitem><para>Oid the instance that you want to work with.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>attr_name</parameter></term>
|
||||
<listitem><para>Name of the attribute that you want to work with.</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Number of elements, when process is successful.
|
||||
</para>
|
||||
<para>
|
||||
-1, when process is unsuccessful.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title><function>cubrid_col_size</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$elem_count = cubrid_col_size ($con, $oid, "tel");
|
||||
echo "$oid (tel) has $elem_count elements\n";
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</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
|
||||
-->
|
98
reference/cubrid/functions/cubrid-column-names.xml
Normal file
98
reference/cubrid/functions/cubrid-column-names.xml
Normal file
|
@ -0,0 +1,98 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.cubrid-column-names" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>cubrid_column_names</refname>
|
||||
<refpurpose>Is used to get the column names </refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>mixed</type><methodname>cubrid_column_names</methodname>
|
||||
<methodparam><type>int</type><parameter>req_handle</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
The <function>cubrid_column_names</function> function is used to get the column names of the query result by using <parameter>req_handle</parameter>.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>req_handle</parameter></term>
|
||||
<listitem><para>Request handle.</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
array containing column names, when process is successful.
|
||||
</para>
|
||||
<para>
|
||||
&false;, when process is unsuccessful.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title><function>cubrid_column_names</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$req = cubrid_execute ($con, "select * from person");
|
||||
if ($req) {
|
||||
$coltypes = cubrid_column_types ($req);
|
||||
$colnames = cubrid_column_names ($req);
|
||||
while (list ($key, $coltype) = each ($coltypes))
|
||||
echo $coltype;
|
||||
while (list ($key, $colname) = each ($colnames))
|
||||
echo $colname;
|
||||
cubrid_close_request ($req);
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>cubrid_prepare</function></member>
|
||||
<member><function>cubrid_execute</function></member>
|
||||
<member><function>cubrid_column_types</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
|
||||
-->
|
98
reference/cubrid/functions/cubrid-column-types.xml
Normal file
98
reference/cubrid/functions/cubrid-column-types.xml
Normal file
|
@ -0,0 +1,98 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.cubrid-column-types" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>cubrid_column_types</refname>
|
||||
<refpurpose>Gets column types </refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>mixed</type><methodname>cubrid_column_types</methodname>
|
||||
<methodparam><type>int</type><parameter>req_handle</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
The <function>cubrid_column_types</function> function gets column types of query results by using <parameter>req_handle</parameter>.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>req_handle</parameter></term>
|
||||
<listitem><para>Request handle.</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Array containing column types, when process is successful.
|
||||
</para>
|
||||
<para>
|
||||
&false;, when process is unsuccessful.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title><function>cubrid_column_types</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$req = cubrid_execute ($con, "select * from person");
|
||||
if ($req) {
|
||||
$coltypes = cubrid_column_types ($req);
|
||||
$colnames = cubrid_column_names ($req);
|
||||
while (list ($key, $coltype) = each ($coltypes))
|
||||
echo $coltype;
|
||||
while (list ($key, $colname) = each ($colnames))
|
||||
echo $colname;
|
||||
cubrid_close_request ($req);
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>cubrid_column_names</function></member>
|
||||
<member><function>cubrid_prepare</function></member>
|
||||
<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
|
||||
-->
|
93
reference/cubrid/functions/cubrid-commit.xml
Normal file
93
reference/cubrid/functions/cubrid-commit.xml
Normal file
|
@ -0,0 +1,93 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.cubrid-commit" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>cubrid_commit</refname>
|
||||
<refpurpose>Is used to execute commit on the transaction</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>cubrid_commit</methodname>
|
||||
<methodparam><type>int</type><parameter>conn_handle</parameter></methodparam> </methodsynopsis>
|
||||
<para>
|
||||
The <function>cubrid_commit</function> function is used to execute commit on the transaction pointed by <parameter>conn_handle</parameter>, currently on progress. Connection to the server is closed after the <function>cubrid_commit</function> function is called; the connection handle is still valid, however.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>conn_handle</parameter></term>
|
||||
<listitem><para>Connection handle.</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&true;, when process is successful.
|
||||
</para>
|
||||
<para>
|
||||
&false;, when process is unsuccessful.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title><function>cubrid_commit</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$req = cubrid_execute ($oid, "insert into person values (2,’John’)");
|
||||
if ($req) {
|
||||
cubrid_close_request ($req);
|
||||
if ($failed) {
|
||||
cubrid_rollback ($con);
|
||||
} else {
|
||||
cubrid_commit ($con);
|
||||
}
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>cubrid_rollback</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
|
||||
-->
|
123
reference/cubrid/functions/cubrid-connect.xml
Normal file
123
reference/cubrid/functions/cubrid-connect.xml
Normal file
|
@ -0,0 +1,123 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.cubrid-connect" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>cubrid_connect</refname>
|
||||
<refpurpose>Is used to establish the environment for connecting to your server </refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>cubrid_connect</methodname>
|
||||
<methodparam><type>string</type><parameter>host</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>port</parameter></methodparam>
|
||||
<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>
|
||||
</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.
|
||||
</para>
|
||||
<para>
|
||||
Calling the <function>cubrid_connect</function> function does not necessarily make the connection to your server. The actual connection will be made when an operation is requested by using the connection handle.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>host</parameter></term>
|
||||
<listitem><para>Host name of CAS server.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>port</parameter></term>
|
||||
<listitem><para>Port number of CAS server.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>dbname</parameter></term>
|
||||
<listitem><para>Name of database.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>userid</parameter></term>
|
||||
<listitem><para>User name for the database.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>passwd</parameter></term>
|
||||
<listitem><para>User password.</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Connection handle, when process is successful.
|
||||
</para>
|
||||
<para>
|
||||
&false;, when process is unsuccessful.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title><function>cubrid_connect</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$con = cubrid_connect ("210.211.133.100", 12345, "demodb");
|
||||
|
||||
if ($con) {
|
||||
echo "connected successfully";
|
||||
$req =cubrid_execute($con, "insert into person values(1,’James’)");
|
||||
|
||||
if ($req) {
|
||||
cubrid_close_request ($req);
|
||||
cubrid_commit ($con);
|
||||
} else {
|
||||
cubrid_rollback ($con);
|
||||
}
|
||||
cubrid_disconnect ($con);
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>cubrid_disconnect</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
|
||||
-->
|
94
reference/cubrid/functions/cubrid-current-oid.xml
Normal file
94
reference/cubrid/functions/cubrid-current-oid.xml
Normal file
|
@ -0,0 +1,94 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.cubrid-current-oid" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>cubrid_current_oid</refname>
|
||||
<refpurpose>Is used to get the oid of the current cursor location</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>mixed</type><methodname>cubrid_current_oid</methodname>
|
||||
<methodparam><type>int</type><parameter>req_handle</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
The <function>cubrid_current_oid</function> function is used to get the oid of the current cursor location from the query result. To use <function>cubrid_current_oid</function>, the query executed must be a updatable query, and the CUBRID_ INCLUDE_OID option must be included during the query execution.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>req_handle</parameter></term>
|
||||
<listitem><para>Request handle.</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Oid of current cursor location, when process is successful
|
||||
</para>
|
||||
<para>
|
||||
&false;, when process is unsuccessful.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title><function>cubrid_current_oid</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$req =cubrid_execute($con,"select * from person where id =1",
|
||||
CUBRID_INCLUDE_OID);
|
||||
if ($req) {
|
||||
cubrid_fetch ($req);
|
||||
$oid = cubrid_current_oid ($req);
|
||||
cubrid_close_request ($req);
|
||||
echo "OID is $oid";
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</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
|
||||
-->
|
98
reference/cubrid/functions/cubrid-disconnect.xml
Normal file
98
reference/cubrid/functions/cubrid-disconnect.xml
Normal file
|
@ -0,0 +1,98 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.cubrid-disconnect" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>cubrid_disconnect</refname>
|
||||
<refpurpose>Ends the transaction currently on process</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>cubrid_disconnect</methodname>
|
||||
<methodparam><type>int</type><parameter>conn_handle</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
The <function>cubrid_disconnect</function> function ends the transaction currently on process, closes the connection handle and disconnects from server. If there exists any request handle not closed yet at this point, it will be closed.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>conn_handle</parameter></term>
|
||||
<listitem><para>Connection handle.</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&true;, when process is successful.
|
||||
</para>
|
||||
<para>
|
||||
&false;, when process is unsuccessful.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title><function>cubrid_disconnect</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$con = cubrid_connect ("210.211.133.100", 12345, "demodb");
|
||||
if ($con) {
|
||||
echo "connected successfully";
|
||||
$req = cubrid_execute ( $con, "insert into person values(1,’James’)");
|
||||
if ($req) {
|
||||
cubrid_close_request ($req);
|
||||
cubrid_commit ($con);
|
||||
} else {
|
||||
cubrid_rollback ($con);
|
||||
}
|
||||
cubrid_disconnect ($con);
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>cubrid_connect</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
|
||||
-->
|
98
reference/cubrid/functions/cubrid-drop.xml
Normal file
98
reference/cubrid/functions/cubrid-drop.xml
Normal file
|
@ -0,0 +1,98 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.cubrid-drop" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>cubrid_drop</refname>
|
||||
<refpurpose>Is used to delete an instance </refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>cubrid_drop</methodname>
|
||||
<methodparam><type>int</type><parameter>conn_handle</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>oid</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
The <function>cubrid_drop</function> function is used to delete an instance from database by using <parameter>oid</parameter>.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>conn_handle</parameter></term>
|
||||
<listitem><para>Connection handle.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>oid</parameter></term>
|
||||
<listitem><para>Oid of the instance that you want to delete.</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&true;, when process is successful.
|
||||
</para>
|
||||
<para>
|
||||
&false;, when process is unsuccessful.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title><function>cubrid_drop</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$deloid = cubrid_get ($con, $oid, "order");
|
||||
$res = cubrid_drop ($con, $deloid);
|
||||
if ($res) {
|
||||
cubrid_commit ($con);
|
||||
} else {
|
||||
cubrid_rollback ($con);
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>cubrid_is_instance</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
|
||||
-->
|
87
reference/cubrid/functions/cubrid-error-code-facility.xml
Normal file
87
reference/cubrid/functions/cubrid-error-code-facility.xml
Normal file
|
@ -0,0 +1,87 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.cubrid-error-code-facility" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>cubrid_error_code_facility</refname>
|
||||
<refpurpose>Is used to get the facility code</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>cubrid_error_code_facility</methodname>
|
||||
<void />
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
The <function>cubrid_error_code_facility</function> function is used to get the facility code (level in which the error occurred) from the error code of the error that occurred during the API execution. Usually, you can get the error code when API returns false as its return value.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
&no.function.parameters;
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Facility code of the error code that occurred: CUBRID_FACILITY_DBMS, CUBRID_FACILITY_CAS, CUBRID_FACILITY_CCI, CUBRID_FACILITY_CLIENT
|
||||
</para>
|
||||
<para />
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title><function>cubrid_error_code_facility</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$req = cubrid_execute ($con, "select id, name from person");
|
||||
if ($req) {
|
||||
while (list ($id, $name) = cubrid_fetch($req))
|
||||
echo $id, $name;
|
||||
} else {
|
||||
echo "Error Code: ", cubrid_error_code ();
|
||||
echo "Error Facility: ", cubrid_error_code_facility ();
|
||||
echo "Error Message: ", cubrid_error_msg ();
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>cubrid_error_code</function></member>
|
||||
<member><function>cubrid_error_msg</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
|
||||
-->
|
87
reference/cubrid/functions/cubrid-error-code.xml
Normal file
87
reference/cubrid/functions/cubrid-error-code.xml
Normal file
|
@ -0,0 +1,87 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.cubrid-error-code" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>cubrid_error_code</refname>
|
||||
<refpurpose>Is used to get the error code </refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>cubrid_error_code</methodname>
|
||||
<void />
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
The <function>cubrid_error_code</function> function is used to get the error code of the error that occurred during the API execution. Usually, it gets the error code when API returns false as its return value.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
&no.function.parameters;
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Error code of the error that occurred.
|
||||
</para>
|
||||
<para />
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title><function>cubrid_error_code</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$req = cubrid_execute ($con, "select id, name from person");
|
||||
if ($req) {
|
||||
while (list ($id, $name) = cubrid_fetch($req))
|
||||
echo $id, $name;
|
||||
} else {
|
||||
echo "Error Code: ", cubrid_error_code ();
|
||||
echo "Error Facility: ", cubrid_error_code_facility ();
|
||||
echo "Error Message: ", cubrid_error_msg ();
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>cubrid_error_code_facility</function></member>
|
||||
<member><function>cubrid_error_msg</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
|
||||
-->
|
87
reference/cubrid/functions/cubrid-error-msg.xml
Normal file
87
reference/cubrid/functions/cubrid-error-msg.xml
Normal file
|
@ -0,0 +1,87 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.cubrid-error-msg" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>cubrid_error_msg</refname>
|
||||
<refpurpose>Is used to get the error message</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>string</type><methodname>cubrid_error_msg</methodname>
|
||||
<void />
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
The <function>cubrid_error_msg</function> function is used to get the error message that occurred during the use of CUBRID API. Usually, it gets error message when API returns false as its return value.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
&no.function.parameters;
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Error message that occurred.
|
||||
</para>
|
||||
<para />
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title><function>cubrid_error_msg</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$req = cubrid_execute ($con, "select id, name from person");
|
||||
if ($req) {
|
||||
while (list ($id, $name) = cubrid_fetch($req))
|
||||
echo $id, $name;
|
||||
} else {
|
||||
echo "Error Code: ", cubrid_error_code ();
|
||||
echo "Error Facility: ", cubrid_error_code_facility ();
|
||||
echo "Error Message: ", cubrid_error_msg ();
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>cubrid_error_code</function></member>
|
||||
<member><function>cubrid_error_code_facility</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
|
||||
-->
|
132
reference/cubrid/functions/cubrid-execute.xml
Normal file
132
reference/cubrid/functions/cubrid-execute.xml
Normal file
|
@ -0,0 +1,132 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.cubrid-execute" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>cubrid_execute</refname>
|
||||
<refpurpose>Is used to execute the given SQL sentence.</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>cubrid_execute</methodname>
|
||||
<methodparam><type>int</type><parameter>conn_handle</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>SQL</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>option</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>cubrid_execute</methodname>
|
||||
<methodparam><type>int</type><parameter>request_handle</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>option</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
The <function>cubrid_execute</function> function is used to execute the given SQL sentence. It executes the query by using <parameter>conn_handle</parameter> and SQL, and then returns the request handle created. It is used for simple execution of query, where the parameter binding is not needed. In addition, the <function>cubrid_execute</function> function is used to execute the prepared statement by means of <function>cubrid_prepare</function> and <function>cubrid_bind</function>. At this time, you need to specify arguments of <parameter>request_handle</parameter> and <parameter>option</parameter>.
|
||||
</para>
|
||||
<para>
|
||||
You can use the <parameter>option</parameter> argument to tell whether to receive oid of the row after the execution, and, whether to execute the query in asynchronous mode. You can use it by setting the CUBRID_INCLUDE_OID and CUBRID_ASYNC using bitwise or operator. If the both variables are not explicitly given, they are not selected by default.
|
||||
</para>
|
||||
<para>
|
||||
If the first argument is <parameter>request_handle</parameter> to execute the <function>cubrid_prepare</function> function, you can specify an option, CUBRID_ASYNC only.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>conn_handle</parameter></term>
|
||||
<listitem><para>Connection handle.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>SQL</parameter></term>
|
||||
<listitem><para>SQL to be executed.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>option</parameter></term>
|
||||
<listitem><para>Query execution option CUBRID_INCLUDE_OID, CUBRID_ASYNC.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>request_handle</parameter></term>
|
||||
<listitem><para><function>cubrid_prepare</function> handle.</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Request handle, when process is successful.
|
||||
</para>
|
||||
<para>
|
||||
&false;, when process is unsuccessful.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title><function>cubrid_execute</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$con = cubrid_connect ("dbsvr.cubrid.com", 33000, "demodb");
|
||||
if ($con) { echo "connected successfully";
|
||||
$req = cubrid_execute ( $con, "select * from members", CUBRID_INCLUDE_OID | CUBRID_ASYNC); if ($req) {
|
||||
while ( list ($id, $name) = cubrid_fetch ($req) ){ echo $id; echo $name;
|
||||
}
|
||||
cubrid_close_request ($req); } cubrid_disconnect ($con);
|
||||
} $con = cubrid_connect ("dbsvr.cubrid.com", 33000, "demodb");
|
||||
if ($con) { echo "connected successfully";
|
||||
$sql = "insert into tbl values ( ?,?,?)"; $req = cubrid_prepare( $con, $sql, CUBRID_INCLUDE_OID );
|
||||
$i = 0;
|
||||
while ( $i < 2 ) {
|
||||
$res = cubrid_bind( $req, 1, "1", "NUMBER");
|
||||
$res = cubrid_bind( $req, 2, "2");
|
||||
$res = cubrid_bind( $req, 3, "04:22:34 PM 08/07/2007");
|
||||
$res = cubrid_execute( $req );
|
||||
$i = $i + 1;
|
||||
}}
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>cubrid_close_request</function></member>
|
||||
<member><function>cubrid_commit</function></member>
|
||||
<member><function>cubrid_rollback</function></member>
|
||||
<member><function>cubrid_prepare</function></member>
|
||||
<member><function>cubrid_bind</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
|
||||
-->
|
110
reference/cubrid/functions/cubrid-fetch.xml
Normal file
110
reference/cubrid/functions/cubrid-fetch.xml
Normal file
|
@ -0,0 +1,110 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.cubrid-fetch" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>cubrid_fetch</refname>
|
||||
<refpurpose>Is used to get a single row</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>mixed</type><methodname>cubrid_fetch</methodname>
|
||||
<methodparam><type>int</type><parameter>req_handle</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>type</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
The <function>cubrid_fetch</function> function is used to get a single row from the query result. The cursor automatically moves to the next row after getting the result.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>req_handle</parameter></term>
|
||||
<listitem><para>Request handle.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>type</parameter></term>
|
||||
<listitem><para>Array type of the fetched result CUBRID_NUM, CUBRID_ASSOC, CUBRID_BOTH, CUBRID_OBJECT.</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>Result array or object, when process is successful.</para>
|
||||
<para>&false;, when process is unsuccessful.</para>
|
||||
<para>The result can be received either as an array or as an object, and you can decide which data type to use by setting the <parameter>type</parameter> argument. The <parameter>type</parameter> variable can be set to one of the following values:</para>
|
||||
<simplelist>
|
||||
<member>CUBRID_NUM : Numerical array (0-based)</member>
|
||||
<member>CUBRID_ASSOC : Associative array</member>
|
||||
<member>CUBRID_BOTH : Numerical & Associative array (default)</member>
|
||||
<member>CUBRID_OBJECT : object that has the attribute name as the column name of query result</member>
|
||||
</simplelist>
|
||||
<para>When <parameter>type</parameter> argument is omitted, the result will be received using CUBRID_BOTH option as default. When you want to receive query result in object data type, the column name of the result must obey the naming rules for identifiers in PHP. For example, column name such as "count(*)" cannot be received in object type.</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title><function>cubrid_fetch</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$req = cubrid_execute ( $con, "select * from members", CUBRID_INCLUDE_OID | CUBRID_ASYNC);
|
||||
if ($req) {
|
||||
while ( list ($id, $name) = cubrid_fetch ($req) ){
|
||||
echo $id;
|
||||
echo $name;
|
||||
}
|
||||
cubrid_close_request ($req);
|
||||
}
|
||||
$req = cubrid_execute ($con, "select * from teams");
|
||||
if ($req) {
|
||||
while ($row = cubrid_fetch ($req, CUBRID_OBJECT)) {
|
||||
echo $row->id;
|
||||
echo $row->name;
|
||||
}
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</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
|
||||
-->
|
98
reference/cubrid/functions/cubrid-get-class-name.xml
Normal file
98
reference/cubrid/functions/cubrid-get-class-name.xml
Normal file
|
@ -0,0 +1,98 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.cubrid-get-class-name" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>cubrid_get_class_name</refname>
|
||||
<refpurpose>Is used to get the class name</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>mixed</type><methodname>cubrid_get_class_name</methodname>
|
||||
<methodparam><type>int</type><parameter>conn_handle</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>oid</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
The <function>cubrid_get_class_name</function> function is used to get the class name from <parameter>oid</parameter>.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>conn_handle</parameter></term>
|
||||
<listitem><para>Connection handle.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>oid</parameter></term>
|
||||
<listitem><para>Oid of the instance that you want to check the existence.</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Class name when process is successful.
|
||||
</para>
|
||||
<para>
|
||||
&false;, when process is unsuccessful.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title><function>cubrid_get_class_name</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$target_oid = cubrid_get ($con, $oid, "customer");
|
||||
$class_name = cubrid_get_class_name ($con, $target_oid);
|
||||
if ($class_name) {
|
||||
echo "class name of $oid is $class_name\n";
|
||||
} else {
|
||||
echo "error\n";
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>cubrid_is_instance</function></member>
|
||||
<member><function>cubrid_drop</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
|
||||
-->
|
97
reference/cubrid/functions/cubrid-get.xml
Normal file
97
reference/cubrid/functions/cubrid-get.xml
Normal file
|
@ -0,0 +1,97 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.cubrid-get" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>cubrid_get</refname>
|
||||
<refpurpose>Is used to get the attribute</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>mixed</type><methodname>cubrid_get</methodname>
|
||||
<methodparam><type>int</type><parameter>conn_handle</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>oid</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>mixed</type><parameter>attr</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
The <function>cubrid_get</function> function is used to get the attribute of the instance of the given <parameter>oid</parameter>. You can get single attribute by using string data type for the <parameter>attr</parameter> argument, or many attributes by using array data type for the <parameter>attr</parameter> argument.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>conn_handle</parameter></term>
|
||||
<listitem><para>Connection handle.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>oid</parameter></term>
|
||||
<listitem><para>Oid of the instance that you want to read.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>attr</parameter></term>
|
||||
<listitem><para>Name of the attribute that you want to read.</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>Content of the requested attribute, when process is successful;</para>
|
||||
<para>&false; when process is unsuccessful (If error occurs to distinguish empty string from NULL, then it prints the warning message. You can check the error by using <function>cubrid_error_code</function>)</para>
|
||||
<para>When <parameter>attr</parameter> is set with string data type, the result is returned as a string; when <parameter>attr</parameter> is set with array data type (0-based numerical array), then the result is returned in associative array. When <parameter>attr</parameter> is omitted, then all attributes are received in array form.</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title><function>cubrid_get</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$attrarray = cubrid_get ($con, $oid);
|
||||
echo $attrarray["id"];
|
||||
echo $attrarray["name"];
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>cubrid_put</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
|
||||
-->
|
104
reference/cubrid/functions/cubrid-is-instance.xml
Normal file
104
reference/cubrid/functions/cubrid-is-instance.xml
Normal file
|
@ -0,0 +1,104 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.cubrid-is-instance" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>cubrid_is_instance</refname>
|
||||
<refpurpose>Is used to check whether the instance</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>cubrid_is_instance</methodname>
|
||||
<methodparam><type>int</type><parameter>conn_handle</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>oid</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
The <function>cubrid_is_instance</function> function is used to check whether the instance pointed by the given <parameter>oid</parameter> exists or not.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>conn_handle</parameter></term>
|
||||
<listitem><para>Connection handle.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>oid</parameter></term>
|
||||
<listitem><para>Oid of the instance that you want to check the existence.</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
1, if such instance exists;
|
||||
</para>
|
||||
<para>
|
||||
0, if such instance does not exist;
|
||||
</para>
|
||||
<para>
|
||||
-1, in case of error
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title><function>cubrid_is_instance</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$target_oid = cubrid_get ($con, $oid, "customer");
|
||||
$res = cubrid_is_instance ($con, $target_oid);
|
||||
if ($res == 1) {
|
||||
echo "$oid is presents.\n";
|
||||
} else if ($res == 0){
|
||||
echo "$oid is not presents.\n";
|
||||
} else {
|
||||
echo "error\n";
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>cubrid_drop</function></member>
|
||||
<member><function>cubrid_get_class_name</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
|
||||
-->
|
107
reference/cubrid/functions/cubrid-load-from-glo.xml
Normal file
107
reference/cubrid/functions/cubrid-load-from-glo.xml
Normal file
|
@ -0,0 +1,107 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.cubrid-load-from-glo" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>cubrid_load_from_glo</refname>
|
||||
<refpurpose>Is used to read a data</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>cubrid_load_from_glo</methodname>
|
||||
<methodparam><type>int</type><parameter>conn_handle</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>oid</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>file_name</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
The <function>cubrid_load_from_glo</function> function is used to read a data from a glo instance, and saves it in a designated file.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>conn_handle</parameter></term>
|
||||
<listitem><para>Connection handle.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>oid</parameter></term>
|
||||
<listitem><para>Oid of the glo instance that you want to read the data from.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>file_name</parameter></term>
|
||||
<listitem><para>Name of the file where you want to save the data in.</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&true;, when process is successful.
|
||||
</para>
|
||||
<para>
|
||||
&false;, when process is unsuccessful.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title><function>cubrid_load_from_glo</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$req = cubrid_execute ($con, "select image from person where id=1");
|
||||
if ($req) {
|
||||
list ($oid) = cubrid_fetch($req);
|
||||
cubrid_close_request($req);
|
||||
$res = cubrid_load_from_glo ($con, $oid, "output.jpg");
|
||||
if ($res) {
|
||||
echo "image changed successfully";
|
||||
}
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>cubrid_new_glo</function></member>
|
||||
<member><function>cubrid_save_to_glo</function></member>
|
||||
<member><function>cubrid_send_glo</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
|
||||
-->
|
93
reference/cubrid/functions/cubrid-lock-read.xml
Normal file
93
reference/cubrid/functions/cubrid-lock-read.xml
Normal file
|
@ -0,0 +1,93 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.cubrid-lock-read" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>cubrid_lock_read</refname>
|
||||
<refpurpose>Is used to put read lock</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>cubrid_lock_read</methodname>
|
||||
<methodparam><type>int</type><parameter>conn_handle</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>oid</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
The <function>cubrid_lock_read</function> function is used to put read lock on the instance pointed by given <parameter>oid</parameter>.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>conn_handle</parameter></term>
|
||||
<listitem><para>Connection handle.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>oid</parameter></term>
|
||||
<listitem><para>Oid of the instance that you want to put read lock on.</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&true;, when process is successful.
|
||||
</para>
|
||||
<para>
|
||||
&false;, when process is unsuccessful.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title><function>cubrid_lock_read</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$lock_oid = cubrid_get ($con, $oid, "next_id");
|
||||
$res = cubrid_lock_read ($con, $lock_oid);
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>cubrid_lock_write</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
|
||||
-->
|
93
reference/cubrid/functions/cubrid-lock-write.xml
Normal file
93
reference/cubrid/functions/cubrid-lock-write.xml
Normal file
|
@ -0,0 +1,93 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.cubrid-lock-write" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>cubrid_lock_write</refname>
|
||||
<refpurpose>Is used to put write lock</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>cubrid_lock_write</methodname>
|
||||
<methodparam><type>int</type><parameter>conn_handle</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>oid</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
The <function>cubrid_lock_write</function> function is used to put write lock on the instance pointed by the given <parameter>oid</parameter>.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>conn_handle</parameter></term>
|
||||
<listitem><para>Connection handle.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>oid</parameter></term>
|
||||
<listitem><para>Oid of the instance that you want to put write lock on.</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&true;, when process is successful.
|
||||
</para>
|
||||
<para>
|
||||
&false;, when process is unsuccessful.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title><function>cubrid_lock_write</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$lock_oid = cubrid_get ($con, $oid, "next_id");
|
||||
$res = cubrid_lock_write ($con, $lock_oid);
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>cubrid_lock_read</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
|
||||
-->
|
111
reference/cubrid/functions/cubrid-move-cursor.xml
Normal file
111
reference/cubrid/functions/cubrid-move-cursor.xml
Normal file
|
@ -0,0 +1,111 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.cubrid-move-cursor" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>cubrid_move_cursor</refname>
|
||||
<refpurpose>Is used to move the current cursor location</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>cubrid_move_cursor</methodname>
|
||||
<methodparam><type>int</type><parameter>req_handle</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>offset</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>origin</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
The <function>cubrid_move_cursor</function> function is used to move the current cursor location of <parameter>req_handle</parameter> by the value set in the <parameter>offset</parameter> argument, to the direction set in the <parameter>origin</parameter> argument. To set the <parameter>origin</parameter> argument, you can use CUBRID_CURSOR_FIRST for the first part of the result, CUBRID_CURSOR_CURRENT for the current location of the result, or CUBRID_CURSOR_LAST for the last part of the result. If <parameter>origin</parameter> argument is not explicitly designated, then the function uses CUBRID_CURSOR_CURRENT as its default value.
|
||||
</para>
|
||||
<para>
|
||||
If the value of cursor movement range goes over the valid limit, then the cursor moves to the next location after the valid range for the cursor. For example, if you move 20 units in the result with the size of 10, then the cursor will move to 11th place and return CUBRID_NO_MORE_DATA.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>req_handle</parameter></term>
|
||||
<listitem><para>Request handle.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>offset</parameter></term>
|
||||
<listitem><para>Number of units you want to move the cursor.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>origin</parameter></term>
|
||||
<listitem><para>Location where you want to move the cursor from CUBRID_CURSOR_FIRST, CUBRID_CURSOR_CURRENT, CUBRID_CURSOR_LAST.</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
CUBRID_CURSOR_SUCCESS, when process is successful.
|
||||
</para>
|
||||
<para>
|
||||
CUBRID_NO_MORE_DATA, when it is not a valid cursor location.
|
||||
</para>
|
||||
<para>
|
||||
CUBRID_CURSOR_ERROR, in case of error.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title><function>cubrid_move_cursor</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
cubrid_move_cursor ($req_handle, 1, CUBRID_CURSOR_FIRST);
|
||||
// move to the first possible cursor location
|
||||
$row = cubrid_fetch ($req_handle);
|
||||
echo $row["id"], $row["name"];
|
||||
|
||||
cubrid_move_cursor ($req_handle, 1, CUBRID_CURSOR_LAST);
|
||||
// move to the last possible cursor location
|
||||
$row = cubrid_fetch ($req_handle);
|
||||
echo $row["id"], $row["name"];
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</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
|
||||
-->
|
107
reference/cubrid/functions/cubrid-new-glo.xml
Normal file
107
reference/cubrid/functions/cubrid-new-glo.xml
Normal file
|
@ -0,0 +1,107 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.cubrid-new-glo" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>cubrid_new_glo</refname>
|
||||
<refpurpose>Is used to create a glo instance</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>mixed</type><methodname>cubrid_new_glo</methodname>
|
||||
<methodparam><type>int</type><parameter>conn_handle</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>class_name</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>file_name</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
The <function>cubrid_new_glo</function> function is used to create a glo instance in the requested class (glo class). The glo created is a LO type, and is stored in the <parameter>file_name</parameter> file.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>conn_handle</parameter></term>
|
||||
<listitem><para>Connection handle.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>class_name</parameter></term>
|
||||
<listitem><para>Name of the class that you want to create a glo in.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>file_name</parameter></term>
|
||||
<listitem><para>The file name that you want to save in the newly created glo.</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Oid of the instance created, when process is successful.
|
||||
</para>
|
||||
<para>
|
||||
&false;, when process is unsuccessful.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title><function>cubrid_new_glo</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$oid = cubrid_new_glo ($con, "glo", "input.jpg");
|
||||
if ($oid){
|
||||
$req = cubrid_execute ($con, "insert into person(image) values ($oid)");
|
||||
if ($req) {
|
||||
echo "image inserted successfully";
|
||||
cubrid_close_request ($req);
|
||||
cubrid_commit($con);
|
||||
}
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>cubrid_save_to_glo</function></member>
|
||||
<member><function>cubrid_load_from_glo</function></member>
|
||||
<member><function>cubrid_send_glo</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
|
||||
-->
|
95
reference/cubrid/functions/cubrid-num-cols.xml
Normal file
95
reference/cubrid/functions/cubrid-num-cols.xml
Normal file
|
@ -0,0 +1,95 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.cubrid-num-cols" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>cubrid_num_cols</refname>
|
||||
<refpurpose>Is used to get the number of columns</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>cubrid_num_cols</methodname>
|
||||
<methodparam><type>int</type><parameter>req_handle</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
The <function>cubrid_num_cols</function> function is used to get the number of columns from the query result. It can only be used when the query executed is a select sentence.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>req_handle</parameter></term>
|
||||
<listitem><para>Request handle.</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Number of columns, when process is successful.
|
||||
</para>
|
||||
<para>
|
||||
-1, in case of error.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title><function>cubrid_num_cols</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$req = cubrid_execute ($con, "select * from member");
|
||||
if ($req) {
|
||||
$rows_count = cubrid_num_rows ($req);
|
||||
$cols_count = cubrid_num_cols ($req);
|
||||
echo "result set rows count : $rows\n";
|
||||
echo "result set columns count : $cols\n";
|
||||
cubrid_close_request ($req);
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>cubrid_execute</function></member>
|
||||
<member><function>cubrid_num_rows</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
|
||||
-->
|
99
reference/cubrid/functions/cubrid-num-rows.xml
Normal file
99
reference/cubrid/functions/cubrid-num-rows.xml
Normal file
|
@ -0,0 +1,99 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.cubrid-num-rows" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>cubrid_num_rows</refname>
|
||||
<refpurpose>Is used to get the number of rows</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>cubrid_num_rows</methodname>
|
||||
<methodparam><type>int</type><parameter>req_handle</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
The <function>cubrid_num_rows</function> function is used to get the number of rows from the query result. You can use it only when the query executed is a select sentence. When you want to know such value for INSERT, UPDATE, or DELETE query, you have to use the <function>cubrid_affected_rows</function> function. The <function>cubrid_num_rows</function> function can only be used for synchronous query; it returns 0 when it is used for asynchronous query.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>req_handle</parameter></term>
|
||||
<listitem><para>Request handle.</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Number of rows, when process is successful.
|
||||
</para>
|
||||
<para>
|
||||
0 when the query was done in async mode.
|
||||
</para>
|
||||
<para>
|
||||
-1, in case of error.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title><function>cubrid_num_rows</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$req = cubrid_execute ($con, "select * from member");
|
||||
if ($req) {
|
||||
$rows_count = cubrid_num_rows ($req);
|
||||
$cols_count = cubrid_num_cols ($req);
|
||||
echo "result set rows count : $rows\n";
|
||||
echo "result set columns count : $cols\n";
|
||||
cubrid_close_request ($req);
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>cubrid_execute</function></member>
|
||||
<member><function>cubrid_num_cols</function></member>
|
||||
<member><function>cubrid_affected_rows</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
|
||||
-->
|
108
reference/cubrid/functions/cubrid-prepare.xml
Normal file
108
reference/cubrid/functions/cubrid-prepare.xml
Normal file
|
@ -0,0 +1,108 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.cubrid-prepare" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>cubrid_prepare</refname>
|
||||
<refpurpose>Is a sort of API which represents SQL statements</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>cubrid_prepare</methodname>
|
||||
<methodparam><type>int</type><parameter>conn_handle</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>prepare_stmt</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>option</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
The <function>cubrid_prepare</function> function is a sort of API which represents SQL statements compiled previously to a given connection handle. This pre-compiled SQL statement will be included in the <function>cubrid_prepare</function>. Accccordingly, you can use this statement effectively to execute several times repeatedly or to process long data. Only a single statement can be used and a parameter may put a question mark (?) to appropriate area in the SQL statement. Add a parameter when you bind a value in the VALUES cluse of INSERT statement or in the WHERE clause. Note that it is allowed to bind a value to a MARK(?) by the <function>cubrid_bind</function> only.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>conn_handle</parameter></term>
|
||||
<listitem><para>Connection handle.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>prepare_stmt</parameter></term>
|
||||
<listitem><para>Prepare query.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>option</parameter></term>
|
||||
<listitem><para>OID return option CUBRID_INCLUDE_OID.</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Request handle, if process is successful;
|
||||
</para>
|
||||
<para>
|
||||
&false;, if process is unsuccessful.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title><function>cubrid_prepare</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
if ($con) {
|
||||
$sql = "insert into tbl values ( ?,?,?)";
|
||||
$req = cubrid_prepare( $con, $sql, CUBRID_INCLUDE_OID );
|
||||
$i = 0;
|
||||
while ( $i < 2 ) {
|
||||
$res = cubrid_bind( $req, 1, "1", "NUMBER");
|
||||
$res = cubrid_bind( $req, 2, "2");
|
||||
$res = cubrid_bind( $req, 3, "04:22:34 PM 08/07/2007");
|
||||
$res = cubrid_execute( $req );
|
||||
$i = $i + 1;
|
||||
}}
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>cubrid_execute</function></member>
|
||||
<member><function>cubrid_bind</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
|
||||
-->
|
111
reference/cubrid/functions/cubrid-put.xml
Normal file
111
reference/cubrid/functions/cubrid-put.xml
Normal file
|
@ -0,0 +1,111 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.cubrid-put" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>cubrid_put</refname>
|
||||
<refpurpose>Is used to update an attribute</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>cubrid_put</methodname>
|
||||
<methodparam><type>int</type><parameter>conn_handle</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>oid</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>string</type><parameter>attr</parameter></methodparam>
|
||||
<methodparam><type>mixed</type><parameter>value</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
The <function>cubrid_put</function> function is used to update an attribute of the instance of the given <parameter>oid</parameter>. You can update single attribute by using string data type to set <parameter>attr</parameter>. In such case, you can use integer, float-point, or string type data for the <parameter>value</parameter> argument. To update multiple number of attributes, you can disregard the <parameter>attr</parameter> argument, and set <parameter>value</parameter> argument with associative array data type. However, you cannot use the method for attribute of collection type. You have to use APIs related to collection type (<function>cubrid_set_add</function>, <function>cubrid_set_drop</function>, etc) when you want to use <function>cubrid_put</function> on collection typed attribute.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>conn_handle</parameter></term>
|
||||
<listitem><para>Connection handle.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>oid</parameter></term>
|
||||
<listitem><para>Oid of the instance that you want to update.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>attr</parameter></term>
|
||||
<listitem><para>Name of the attribute that you want to update.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>value</parameter></term>
|
||||
<listitem><para>New value that you want to assign to the attribute.</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&true;, when process is successful.
|
||||
</para>
|
||||
<para>
|
||||
&false;, when process is unsuccessful.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title><function>cubrid_put</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$attrarray = cubrid_get ($con, $oid);
|
||||
$attrarray["name"] = "New Name";
|
||||
cubrid_put ($con, $oid, $attrarray);
|
||||
cubrid_put ($con, $oid, "name", "New Name2");
|
||||
cubrid_put ($con, $oid, "hobbies", array("aa", "bb"));
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>cubrid_get</function></member>
|
||||
<member><function>cubrid_set_add</function></member>
|
||||
<member><function>cubrid_set_drop</function></member>
|
||||
<member><function>cubrid_seq_insert</function></member>
|
||||
<member><function>cubrid_seq_drop</function></member>
|
||||
<member><function>cubrid_seq_put</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
|
||||
-->
|
99
reference/cubrid/functions/cubrid-rollback.xml
Normal file
99
reference/cubrid/functions/cubrid-rollback.xml
Normal file
|
@ -0,0 +1,99 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.cubrid-rollback" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>cubrid_rollback</refname>
|
||||
<refpurpose>Executes rollback on the transaction</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>cubrid_rollback</methodname>
|
||||
<methodparam><type>int</type><parameter>conn_handle</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
The <function>cubrid_rollback</function> function executes rollback on the transaction pointed by <parameter>conn_handle</parameter>, currently in progress.
|
||||
</para>
|
||||
<para>
|
||||
Connection to server is closed after calling <function>cubrid_rollback</function>. Connection handle, however, is still valid.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>conn_handle</parameter></term>
|
||||
<listitem><para>Connection handle.</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&true;, when process is successful.
|
||||
</para>
|
||||
<para>
|
||||
&false;, when process is unsuccessful.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title><function>cubrid_rollback</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$req = cubrid_execute ($oid, "insert into person values (2,’John’)");
|
||||
if ($req) {
|
||||
cubrid_close_request ($req);
|
||||
if ($failed) {
|
||||
cubrid_rollback ($con);
|
||||
} else {
|
||||
cubrid_commit ($con);
|
||||
}
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>cubrid_commit</function></member>
|
||||
<member><function>cubrid_disconnect</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
|
||||
-->
|
107
reference/cubrid/functions/cubrid-save-to-glo.xml
Normal file
107
reference/cubrid/functions/cubrid-save-to-glo.xml
Normal file
|
@ -0,0 +1,107 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.cubrid-save-to-glo" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>cubrid_save_to_glo</refname>
|
||||
<refpurpose>Is used to save requested file</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>cubrid_save_to_glo</methodname>
|
||||
<methodparam><type>int</type><parameter>conn_handle</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>oid</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>file_name</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
The <function>cubrid_save_to_glo</function> function is used to save requested file in a glo instance.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>conn_handle</parameter></term>
|
||||
<listitem><para>Connection handle.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>oid</parameter></term>
|
||||
<listitem><para>Oid of the glo instance that you want to save a file in.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>file_name</parameter></term>
|
||||
<listitem><para>The name of the file that you want to save.</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&true;, when process is successful.
|
||||
</para>
|
||||
<para>
|
||||
&false;, when process is unsuccessful.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title><function>cubrid_save_to_glo</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$req = cubrid_execute ($con, "select image from person where id=1");
|
||||
if ($req) {
|
||||
list ($oid) = cubrid_fetch($req);
|
||||
cubrid_close_request($req);
|
||||
$res = cubrid_save_to_glo ($con, $oid, "input.jpg");
|
||||
if ($res) {
|
||||
echo "image changed successfully";
|
||||
}
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>cubrid_new_glo</function></member>
|
||||
<member><function>cubrid_load_from_glo</function></member>
|
||||
<member><function>cubrid_send_glo</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
|
||||
-->
|
97
reference/cubrid/functions/cubrid-schema.xml
Normal file
97
reference/cubrid/functions/cubrid-schema.xml
Normal file
|
@ -0,0 +1,97 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.cubrid-schema" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>cubrid_schema</refname>
|
||||
<refpurpose>Is used to get the requested schema information</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>mixed</type><methodname>cubrid_schema</methodname>
|
||||
<methodparam><type>int</type><parameter>conn_handle</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>schema_type</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>string</type><parameter>class_name</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>string</type><parameter>attr_name</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
The <function>cubrid_schema</function> function is used to get the requested schema information from database. You have to designate <parameter>class_name</parameter>, if you want to get information on certain class, <parameter>attr_name</parameter>, if you want to get information on certain attribute (can be used only with CUBRID_ SCH_ATTR_PRIVILEGE).
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>conn_handle</parameter></term>
|
||||
<listitem><para>Connection handle.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>schema_type</parameter></term>
|
||||
<listitem><para>Schema data that you want to know.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>class_name</parameter></term>
|
||||
<listitem><para>Class you want to know the schema of.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>attr_name</parameter></term>
|
||||
<listitem><para>Attribute you want to know the schema of.</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
array containing the schema information, when process is successful;
|
||||
</para>
|
||||
<para>
|
||||
-1, when process is unsuccessful
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title><function>cubrid_schema</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$attrs = cubrid_schema ($con, CUBRID_SCH_ATTRIBUTE, "person");
|
||||
while (list($key, $value) = each($attrs)) {
|
||||
echo $value["NAME"];
|
||||
echo $value["DOMAIN"];
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</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
|
||||
-->
|
100
reference/cubrid/functions/cubrid-send-glo.xml
Normal file
100
reference/cubrid/functions/cubrid-send-glo.xml
Normal file
|
@ -0,0 +1,100 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.cubrid-send-glo" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>cubrid_send_glo</refname>
|
||||
<refpurpose>Is used to read data from glo</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>cubrid_send_glo</methodname>
|
||||
<methodparam><type>int</type><parameter>conn_handle</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>oid</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
The <function>cubrid_send_glo</function> function is used to read data from glo instance and sends it to the PHP standard output.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>conn_handle</parameter></term>
|
||||
<listitem><para>Connection handle.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>oid</parameter></term>
|
||||
<listitem><para>Oid of the glo instance that you want to read data from.</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&true;, when process is successful.
|
||||
</para>
|
||||
<para>
|
||||
&false;, when process is unsuccessful.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title><function>cubrid_send_glo</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$req = cubrid_execute ($con, "select image from person where id =1");
|
||||
if ($req) {
|
||||
list ($oid) = cubrid_fetch($req);
|
||||
cubrid_close_request($req);
|
||||
Header ("Content-type: image/jpeg");
|
||||
cubrid_send_glo ($con, $oid);
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>cubrid_new_glo</function></member>
|
||||
<member><function>cubrid_save_to_glo</function></member>
|
||||
<member><function>cubrid_load_from_glo</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
|
||||
-->
|
111
reference/cubrid/functions/cubrid-seq-drop.xml
Normal file
111
reference/cubrid/functions/cubrid-seq-drop.xml
Normal file
|
@ -0,0 +1,111 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.cubrid-seq-drop" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>cubrid_seq_drop</refname>
|
||||
<refpurpose>Is used to delete an element</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>cubrid_seq_drop</methodname>
|
||||
<methodparam><type>int</type><parameter>conn_handle</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>oid</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>attr_name</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>index</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
The <function>cubrid_seq_drop</function> function is used to delete an element you request from the given sequence type attribute in the database.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>conn_handle</parameter></term>
|
||||
<listitem><para>Connection handle.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>oid</parameter></term>
|
||||
<listitem><para>Oid of the instance you want to work with.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>attr_name</parameter></term>
|
||||
<listitem><para>Name of the attribute that you want to delete an element from.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>index</parameter></term>
|
||||
<listitem><para>Index of the element that you want to delete (1-based).</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&true;, when process is successful.
|
||||
</para>
|
||||
<para>
|
||||
&false;, when process is unsuccessful.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title><function>cubrid_seq_drop</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$elems = cubrid_col_get ($con, $oid, "style");
|
||||
$i = 1;
|
||||
while (list ($key, $val) = each($elems)) {
|
||||
if ($val == "1") {
|
||||
echo $val;
|
||||
cubrid_seq_drop ($con, $oid, "style", $i);
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>cubrid_seq_insert</function></member>
|
||||
<member><function>cubrid_seq_put</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
|
||||
-->
|
109
reference/cubrid/functions/cubrid-seq-insert.xml
Normal file
109
reference/cubrid/functions/cubrid-seq-insert.xml
Normal file
|
@ -0,0 +1,109 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.cubrid-seq-insert" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>cubrid_seq_insert</refname>
|
||||
<refpurpose>Is used to insert an element to a sequence</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>cubrid_seq_insert</methodname>
|
||||
<methodparam><type>int</type><parameter>conn_handle</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>oid</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>attr_name</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>index</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>seq_element</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
The <function>cubrid_col_insert</function> function is used to insert an element to a sequence type attribute in a requested location.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>conn_handle</parameter></term>
|
||||
<listitem><para>Connection handle.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>oid</parameter></term>
|
||||
<listitem><para>Oid of the instance you want to work with.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>attr_name</parameter></term>
|
||||
<listitem><para>Name of the attribute you want to insert an instance to.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>index</parameter></term>
|
||||
<listitem><para>Location of the element, you want to insert the element to (1-based).</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>seq_element</parameter></term>
|
||||
<listitem><para>Content of the element that you want to insert.</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&true;, when process is successful.
|
||||
</para>
|
||||
<para>
|
||||
&false;, when process is unsuccessful.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title><function>cubrid_seq_insert</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
cubrid_seq_insert ($con, $oid, "tel", 1, "02-3430-1200");
|
||||
cubrid_seq_insert ($con, $oid, "tel", 1, "02-3430-1300");
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>cubrid_seq_drop</function></member>
|
||||
<member><function>cubrid_seq_put</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
|
||||
-->
|
109
reference/cubrid/functions/cubrid-seq-put.xml
Normal file
109
reference/cubrid/functions/cubrid-seq-put.xml
Normal file
|
@ -0,0 +1,109 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.cubrid-seq-put" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>cubrid_seq_put</refname>
|
||||
<refpurpose>Is used to update the content</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>cubrid_seq_put</methodname>
|
||||
<methodparam><type>int</type><parameter>conn_handle</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>oid</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>attr_name</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>index</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>seq_element</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
The <function>cubrid_seq_put</function> function is used to update the content of the requested element in a sequent type attribute.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>conn_handle</parameter></term>
|
||||
<listitem><para>Connection handle.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>oid</parameter></term>
|
||||
<listitem><para>Oid of the instance you want to work with.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>attr_name</parameter></term>
|
||||
<listitem><para>Name of the attribute that you want to update an element.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>index</parameter></term>
|
||||
<listitem><para>Index (1-based) of the element that you want to update.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>seq_element</parameter></term>
|
||||
<listitem><para>New content that you want to use for the update.</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&true;, when process is successful.
|
||||
</para>
|
||||
<para>
|
||||
&false;, when process is unsuccessful.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title><function>cubrid_seq_put</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
cubrid_seq_put ($con, $oid, "tel", 1, "02-3430-1200");
|
||||
cubrid_seq_put ($con, $oid, "tel", 2, "02-3430-1300");
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>cubrid_seq_drop</function></member>
|
||||
<member><function>cubrid_seq_insert</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
|
||||
-->
|
103
reference/cubrid/functions/cubrid-set-add.xml
Normal file
103
reference/cubrid/functions/cubrid-set-add.xml
Normal file
|
@ -0,0 +1,103 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.cubrid-set-add" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>cubrid_set_add</refname>
|
||||
<refpurpose>Is used to insert a single element</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>cubrid_set_add</methodname>
|
||||
<methodparam><type>int</type><parameter>conn_handle</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>oid</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>attr_name</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>set_element</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
The <function>cubrid_set_add</function> function is used to insert a single element to a set type attribute (set, multiset) you requested.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>conn_handle</parameter></term>
|
||||
<listitem><para>Connection handle.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>oid</parameter></term>
|
||||
<listitem><para>Oid of the instance you want to work with.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>attr_name</parameter></term>
|
||||
<listitem><para>Name of the attribute you want to insert an element.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>set_element</parameter></term>
|
||||
<listitem><para>Content of the element you want to insert.</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&true;, when process is successful.
|
||||
</para>
|
||||
<para>
|
||||
&false;, when process is unsuccessful.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title><function>cubrid_set_add</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
cubrid_set_add ($con, $oid, "friend", "James");
|
||||
cubrid_set_add ($con, $oid, "friend", "Michael");
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>cubrid_seq_drop</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
|
||||
-->
|
103
reference/cubrid/functions/cubrid-set-drop.xml
Normal file
103
reference/cubrid/functions/cubrid-set-drop.xml
Normal file
|
@ -0,0 +1,103 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.cubrid-set-drop" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>cubrid_set_drop</refname>
|
||||
<refpurpose>Is used to delete an element</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>cubrid_set_drop</methodname>
|
||||
<methodparam><type>int</type><parameter>conn_handle</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>oid</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>attr_name</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>set_element</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
The <function>cubrid_set_drop</function> function is used to delete an element that you request from the given set type (set, multiset) attribute of the database.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>conn_handle</parameter></term>
|
||||
<listitem><para>Connection handle.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>oid</parameter></term>
|
||||
<listitem><para>Oid of the instance you want to work with.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>attr_name</parameter></term>
|
||||
<listitem><para>Name of the attribute you want to delete an element from.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>set_element</parameter></term>
|
||||
<listitem><para>Content of the element you want to delete.</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&true;, when process is successful.
|
||||
</para>
|
||||
<para>
|
||||
&false;, when process is unsuccessful.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title><function>cubrid_set_drop</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
cubrid_set_drop ($con, $oid, "friend", "James");
|
||||
cubrid_set_drop ($con, $oid, "friend", "Michael");
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>cubrid_set_add</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
|
||||
-->
|
79
reference/cubrid/functions/cubrid-version.xml
Normal file
79
reference/cubrid/functions/cubrid-version.xml
Normal file
|
@ -0,0 +1,79 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.cubrid-version" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>cubrid_version</refname>
|
||||
<refpurpose>Is used to get the CUBRID PHP module’s version</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>string</type><methodname>cubrid_version</methodname>
|
||||
<void />
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
The <function>cubrid_version</function> function is used to get the CUBRID PHP module’s version.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
&no.function.parameters;
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Version information (eg. "1.2.0").
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title><function>cubrid_version</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
echo cubrid_version();
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>cubrid_error_code</function></member>
|
||||
<member><function>cubrid_error_code_facility</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
|
||||
-->
|
30
reference/cubrid/reference.xml
Normal file
30
reference/cubrid/reference.xml
Normal file
|
@ -0,0 +1,30 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<reference xml:id="ref.cubrid" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>Cubrid &Functions;</title>
|
||||
|
||||
&reference.cubrid.entities.functions;
|
||||
|
||||
</reference>
|
||||
|
||||
<!-- 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
|
||||
-->
|
98
reference/cubrid/setup.xml
Normal file
98
reference/cubrid/setup.xml
Normal file
|
@ -0,0 +1,98 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<chapter xml:id="cubrid.setup" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
&reftitle.setup;
|
||||
|
||||
<section xml:id="cubrid.requirements">
|
||||
&reftitle.required;
|
||||
<para>
|
||||
In order to have these functions available, you must install PHP API for CUBRID (<link xlink:href="&url.cubrid.php.api;">CUBRID PHP API</link>).
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section xml:id="cubrid.installation">
|
||||
&reftitle.install;
|
||||
<para>
|
||||
From the CUBRID homepage (<link xlink:href="&url.cubrid;">CUBRID</link>), download the PHP module.
|
||||
</para>
|
||||
<section>
|
||||
<title>Installing PHP for Windows</title>
|
||||
<para>
|
||||
Create a directory named CUBRID in the directory where PHP is installed, and then copy the <parameter>cubrid_err.msg</parameter> file and the .dll file of the cubrid_php version you just downloaded. If you download CUBRID PHP version 5.1.4, add required settings as shown in the example below by editing the php.ini file.
|
||||
</para>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
extension_dir=C:\PHP\CUBRID
|
||||
extension=cubrid_php5.1.4.dll
|
||||
[CUBRID]
|
||||
cubrid.err_path=C:\PHP\CUBRID
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
Once the configuration is complete, restart the web server. If you can see the CUBRID information as shown below when you check the PHP configuration using the phpinfo() function of PHP, it means that the installation was successful.
|
||||
</para>
|
||||
</section>
|
||||
<section>
|
||||
<title>Installing PHP for Linux</title>
|
||||
<para>
|
||||
Unlike Windows, Linux provides its source code. Download the source code from the CUBRID homepage (<link xlink:href="&url.cubrid;">CUBRID</link>), and install it by following the INSTALL file of the compressed file. Also in the Linux version, edit and save the php.ini file, and then restart the web server.
|
||||
</para>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
; Directory in which the loadable extensions (modules) reside.
|
||||
extension_dir = /usr/lib/php5/lib/php/ext
|
||||
extension=cubrid.so
|
||||
;for Windows, extension=cubrid.dll
|
||||
[CUBRID]
|
||||
cubrid.err_path=/home/cubrid/CUBRID/msg
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
Check the configuration using phpinfo() function.
|
||||
</para>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
[root@localhost]#vi test.php
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
As with the Windows version of PHP, if you can see the CUBRID information on the web browser, it means that the installation was successful.
|
||||
</para>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
<section xml:id="cubrid.configuration">
|
||||
&reftitle.runtime;
|
||||
&no.config;
|
||||
</section>
|
||||
|
||||
<section xml:id="cubrid.resources">
|
||||
&reftitle.resources;
|
||||
<para>
|
||||
There are two resource types used in the CUBRID. The first one is the link identifier for a database connection, the second a resource which holds the result of a query.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
</chapter>
|
||||
|
||||
<!-- 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
|
||||
-->
|
73
reference/cubrid/versions.xml
Normal file
73
reference/cubrid/versions.xml
Normal file
|
@ -0,0 +1,73 @@
|
|||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<!-- $Revision: 293483 $ -->
|
||||
<!--
|
||||
Do NOT translate this file
|
||||
-->
|
||||
<!--
|
||||
NOTE: Version info for the cubrid PECL Extension (1.0) is
|
||||
considered irrelevant so is not listed here.
|
||||
-->
|
||||
<versions>
|
||||
<function name='cubrid' from='PHP 4, PHP 5'/>
|
||||
<function name='cubrid_affected_rows' from='PHP 4, PHP 5'/>
|
||||
<function name='cubrid_bind' from='PHP 4, PHP 5'/>
|
||||
<function name='cubrid_close_prepare' from='PHP 4, PHP 5'/>
|
||||
<function name='cubrid_close_request' from='PHP 4, PHP 5'/>
|
||||
<function name='cubrid_col_get' from='PHP 4, PHP 5'/>
|
||||
<function name='cubrid_col_size' from='PHP 4, PHP 5'/>
|
||||
<function name='cubrid_column_names' from='PHP 4, PHP 5'/>
|
||||
<function name='cubrid_column_types' from='PHP 4, PHP 5'/>
|
||||
<function name='cubrid_commit' from='PHP 4, PHP 5'/>
|
||||
<function name='cubrid_connect' from='PHP 4, PHP 5'/>
|
||||
<function name='cubrid_current_oid' from='PHP 4, PHP 5'/>
|
||||
<function name='cubrid_disconnect' from='PHP 4, PHP 5'/>
|
||||
<function name='cubrid_drop' from='PHP 4, PHP 5'/>
|
||||
<function name='cubrid_error_code_facility' from='PHP 4, PHP 5'/>
|
||||
<function name='cubrid_error_code' from='PHP 4, PHP 5'/>
|
||||
<function name='cubrid_error_msg' from='PHP 4, PHP 5'/>
|
||||
<function name='cubrid_execute' from='PHP 4, PHP 5'/>
|
||||
<function name='cubrid_fetch' from='PHP 4, PHP 5'/>
|
||||
<function name='cubrid_get_class_name' from='PHP 4, PHP 5'/>
|
||||
<function name='cubrid_get' from='PHP 4, PHP 5'/>
|
||||
<function name='cubrid_is_instance' from='PHP 4, PHP 5'/>
|
||||
<function name='cubrid_load_from_glo' from='PHP 4, PHP 5'/>
|
||||
<function name='cubrid_lock_read' from='PHP 4, PHP 5'/>
|
||||
<function name='cubrid_lock_write' from='PHP 4, PHP 5'/>
|
||||
<function name='cubrid_move_cursor' from='PHP 4, PHP 5'/>
|
||||
<function name='cubrid_new_glo' from='PHP 4, PHP 5'/>
|
||||
<function name='cubrid_num_cols' from='PHP 4, PHP 5'/>
|
||||
<function name='cubrid_num_rows' from='PHP 4, PHP 5'/>
|
||||
<function name='cubrid_prepare' from='PHP 4, PHP 5'/>
|
||||
<function name='cubrid_put' from='PHP 4, PHP 5'/>
|
||||
<function name='cubrid_rollback' from='PHP 4, PHP 5'/>
|
||||
<function name='cubrid_save_to_glo' from='PHP 4, PHP 5'/>
|
||||
<function name='cubrid_schema' from='PHP 4, PHP 5'/>
|
||||
<function name='cubrid_send_glo' from='PHP 4, PHP 5'/>
|
||||
<function name='cubrid_seq_drop' from='PHP 4, PHP 5'/>
|
||||
<function name='cubrid_seq_insert' from='PHP 4, PHP 5'/>
|
||||
<function name='cubrid_seq_put' from='PHP 4, PHP 5'/>
|
||||
<function name='cubrid_set_add' from='PHP 4, PHP 5'/>
|
||||
<function name='cubrid_set_drop' from='PHP 4, PHP 5'/>
|
||||
<function name='cubrid_version' from='PHP 4, PHP 5'/>
|
||||
</versions>
|
||||
|
||||
<!-- 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
|
||||
-->
|
Loading…
Reference in a new issue