cvs: phpdoc-he /reference/sqlite constants.xml ini.xml reference.xml /reference/sqlite/functions sqlite-array-query.xml sqlite-busy-timeout.xml sqlite-changes.xml sqlite-close.xml sqlite-column.xml sqlite-create-aggregate.xml sqlite-create-function.xml sqlite-current.xml sqlite-error-string.xml sqlite-escape-string.xml sqlite-fetch-array.xml sqlite-fetch-single.xml sqlite-fetch-string.xml sqlite-field-name.xml sqlite-has-more.xml sqlite-last-error.xml sqlite-last-insert-rowid.xml sqlite-libencoding.xml sqlite-libversion.xml sqlite-next.xml sqlite-num-fields.xml sqlite-num-rows.xml sqlite-open.xml sqlite-popen.xml sqlite-query.xml sqlite-rewind.xml sqlite-seek.xml sqlite-udf-decode-binary.xml sqlite-udf-encode-binary.xml sqlite-unbuffered-query.xml
[email protected] ("Noam Giladi") Mon, 28 Jul 2003 09:40:20 -0000
| Newsgroups | php.doc.he |
|---|---|
| Message-ID | <cvsnoam1059385220@cvsserver> |
noam Mon Jul 28 05:40:20 2003 EDT
Added files:
/phpdoc-he/reference/sqlite constants.xml ini.xml reference.xml
/phpdoc-he/reference/sqlite/functions sqlite-array-query.xml
sqlite-busy-timeout.xml
sqlite-changes.xml
sqlite-close.xml
sqlite-column.xml
sqlite-create-aggregate.xml
sqlite-create-function.xml
sqlite-current.xml
sqlite-error-string.xml
sqlite-escape-string.xml
sqlite-fetch-array.xml
sqlite-fetch-single.xml
sqlite-fetch-string.xml
sqlite-field-name.xml
sqlite-has-more.xml
sqlite-last-error.xml
sqlite-last-insert-rowid.xml
sqlite-libencoding.xml
sqlite-libversion.xml
sqlite-next.xml
sqlite-num-fields.xml
sqlite-num-rows.xml
sqlite-open.xml
sqlite-popen.xml
sqlite-query.xml
sqlite-rewind.xml
sqlite-seek.xml
sqlite-udf-decode-binary.xml
sqlite-udf-encode-binary.xml
sqlite-unbuffered-query.xml
Log:
sqlite
noam-20030728054020.txt
(text/plain, 32 KB)
Index: phpdoc-he/reference/sqlite/constants.xml
+++ phpdoc-he/reference/sqlite/constants.xml
<!-- $Revision: 1.1 $ -->
<section id="sqlite.constants">
<title>÷áåòéí</title>
<para>
äôåð÷öéåú <function>sqlite_fetch_array</function> å
<function>sqlite_current</function>îùúîùåú á ÷áåòéí
áùáéì ñåâéí ùåðéí ùì îòøëéí ùçåæøéí îáñéñ äðúåðéí.
îåâãøéí ä÷áåòéí äáàéí:
</para>
<para>
<table>
<title>SQLite fetch constants</title>
<tgroup cols="2">
<thead>
<row>
<entry>constant</entry>
<entry>meaning</entry>
</row>
</thead>
<tbody>
<row>
<entry>SQLITE_ASSOC</entry>
<entry>
òîåãåú îåçæøåú ìîòøê ëùùîåú äòîåãåú îåçæøåú áúåø äàéðã÷ñ
</entry>
</row>
<row>
<entry>SQLITE_BOTH</entry>
<entry>
òîåãåú îåçæøåú ìîòøê ëùâí ùîåú äòîåãåú îåçæøåú áúåø äàéðã÷ñ,
åâí îåçæø àéðã÷ñ îñôøé
</entry>
</row>
<row>
<entry>SQLITE_NUM</entry>
<entry>
òîåãåú îåçæøåú ìîòøê ëùäàéð÷ñ äåà îñôøé,
äçì î - 0 ùîùîù ëàéðã÷ñ äøàùåï áîòøê
</entry>
</row>
</tbody>
</tgroup>
</table>
</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:"../../../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
-->
Index: phpdoc-he/reference/sqlite/ini.xml
+++ phpdoc-he/reference/sqlite/ini.xml
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<section id="sqlite.configuration">
&reftitle.runtime;
&extension.runtime;
<para>
<table>
<title>àåôöéåú ä÷åðôéâåøöéä á sqlite</title>
<tgroup cols="3">
<thead>
<row>
<entry>Name</entry>
<entry>Default</entry>
<entry>Changeable</entry>
</row>
</thead>
<tbody>
<row>
<entry>sqlite.assoc_case</entry>
<entry>0</entry>
<entry>PHP_INI_ALL</entry>
</row>
</tbody>
</tgroup>
</table>
áùáéì ôøèéí ðåñôéí åäâãøåú á - PHP_INI_* øàä :
<function>ini_set</function>.
</para>
&ini.descriptions.title;
<para>
<<<<<<< ini.xml
äñáø ÷öø òì àéúçåì ä÷åðôéâåøöéä
<variablelist>
=======
<variablelist>
>>>>>>> 1.4
<varlistentry id="ini.sqlite.assoc-case">
<term>
<parameter>sqlite.assoc_case</parameter>
<type>int</type>
</term>
<listitem>
<para>
îúé ìäùúîù á - mixed case (<literal>0</literal>), upper case
(<literal>1</literal>) or lower case (<literal>2</literal>) àéðã÷ñéí.
</para>
<para>
äàåôöéä äæàú èåáä áòé÷ø ëàùø ðãøùú äúàîä òí áñéñé ðúåðéí àçøéí,
ëàùø ùîåú äòîåãåú úîéã îåçæøéí áàåúéåú âãåìåú àå áàåúéåú ÷èðåú
ììà ÷ùø ìùí äàîéúé ùì äùãä ááñéñ äðúåðéí
</para>
<para>
SQLite îçæéøä àú ùîåú äòîåãåú áäúàí ìùí äòîåãä äî÷åøé ùäîùúîù äëðéñ .
ëàùø
<parameter>sqlite.assoc_case</parameter> ð÷áò ì <literal>0</literal>
îåçæø ùí äòîåãä ëôé ùäåà îåôéò ááñéñ äðúåðéí.
ëùäåà ð÷áò ì <literal>1</literal> àå ì<literal>2</literal>, éåçæø äòøê
äùí ëôé ùð÷áò áîôúç upper- or lower-case , áäúàîä.
</para>
<para>
ùéîåù áàåôöéä äæàú òåìä îòè áæîï çéùåá àê îäéø äøáä éåúø
îì÷áåò àú äðåùà áòöîê áòæøú PHP.
</para>
</listitem>
</varlistentry>
</variablelist>
</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:"../../../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
-->
Index: phpdoc-he/reference/sqlite/reference.xml
+++ phpdoc-he/reference/sqlite/reference.xml
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<reference id="ref.sqlite">
<title>SQLite</title>
<titleabbrev>SQLite</titleabbrev>
<partintro>
<section id="sqlite.intro">
&reftitle.intro;
<para>
äîñîê äéðå äøçáä ì SQLite .
SQLite äéà ñôøéä á-C äîàôùøú ìúåëðéåú äî÷åùøåú àìéä ìäùúîù ááñéñ ðúåðéí äîáåññ òì SQL ,ììà öåøê áîòáã RDBMS çéöåðé.
</para>
<para>
SQLite àéðä úåëðéú ì÷åç ùãøëä îú÷ùøéí ìáñéñ ðúåðéí àçø, äéà òöîä äùøú ùì äáñéñ ðúåðéí.
SQLite ÷åøàú åëåúáú åîééöøú àú áñéñ äðúåðéí òì ÷åáõ áãéñ÷.
</para>
<note>
<para>
áùáéì éãò ðåñó ÷ôåõ ìàúø ùì SQLite.
(<ulink url="&url.sqlite;">&url.sqlite;</ulink>).
</para>
</note>
</section>
<section id="sqlite.install">
<title>äú÷ðä</title>
<para>
÷øà àú ä÷åáõ INSTALL , ùäâéò òí çáéìú ä- SQLite , àôùøåú ðåñôú äéà ìäùúîù á PEER
áòæøú "pear install sqlite".
SQLite ëáø ðëììú áçáéìä åàéï öåøê áùåí úåëðä ðåñôú. (îâðéá ìà?).
</para>
<para>
àí àúä îùúîù á - WINDOWS , àúä éëåì ìäåøéã àú âøñú ä- DLL îôä:
(<ulink url="&url.pecl.get.win;php_sqlite.dll">php_sqlite.dll</ulink>).
</para>
</section>
<section id="sqlite.contact">
<title>éöéøú ÷ùø</title>
<para>
ìùàìåú òì SQLite úôðä ìëàï:
<ulink url="&url.php.support;">PHP Mailing lists</ulink>.
</para>
</section>
<section id="sqlite.requirements">
&reftitle.required;
<para>
<<<<<<< reference.xml
òì îðú ìäùúîù á- SQLite ,àúä öøéê ì÷îôì àú ä-PHP òí úîéëä á- SQLite , àå ìäåøéã
àú ääøçáä î .php.ini
=======
In order to have these functions available, you must compile PHP with
SQLite support, or load the SQLite extension dynamically from your
&php.ini;.
>>>>>>> 1.7
</para>
</section>
<section id="sqlite.resources">
&reftitle.resources;
<para>
äçéáåø ìáñéñ äðúåðéí , åîòøê äúåöàåú, äí ùðé äîùàáéí ùì îîù÷ SQLite.
</para>
</section>
&reference.sqlite.constants;
&reference.sqlite.ini;
</partintro>
&reference.sqlite.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:"../../../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
-->
Index: phpdoc-he/reference/sqlite/functions/sqlite-array-query.xml
+++ phpdoc-he/reference/sqlite/functions/sqlite-array-query.xml
<<<<<<< sqlite-array-query.xml
<?xml version="1.0" encoding="WINDOWS-1255"?>
<!-- edited with XMLSPY v5 rel. 4 U (http://www.xmlspy.com) by noam (i-com) -->
<!-- $Revision: 1.1 $ -->
=======
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
>>>>>>> 1.6
<refentry id="function.sqlite-array-query">
<<<<<<< sqlite-array-query.xml
<refnamediv>
<refname>sqlite_array_query</refname>
<refpurpose>_____ ______ ___ ____ _______ _______ ____.</refpurpose>
</refnamediv>
<refsect1>
<title>____</title>
<methodsynopsis>
<type>array</type>
<methodname>sqlite_array_query</methodname>
<methodparam>
<type>resource</type>
<parameter>db</parameter>
</methodparam>
<methodparam>
<type>string</type>
<parameter>query</parameter>
</methodparam>
<methodparam choice="opt">
<type>int</type>
<parameter>result_type</parameter>
</methodparam>
<methodparam choice="opt">
<type>bool</type>
<parameter>decode_binary</parameter>
</methodparam>
</methodsynopsis>
<para>
<function>sqlite_array_query</function> ____ ___ ______ _
<function>sqlite_query</function> ___
<function>sqlite_fetch_array</function>
____ __ ____ ______
___ _____ __ ____ _____, (___ _____ ____). º____ _
<function>sqlite_array_query</function>_____ _____ _______ _____ __º____ ___
=======
<refnamediv>
<refname>sqlite_array_query</refname>
<refpurpose>Execute a query against a given database and returns an array.</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>array</type><methodname>sqlite_array_query</methodname>
<methodparam><type>resource</type><parameter>dbhandle</parameter></methodparam>
<methodparam><type>string</type><parameter>query</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>result_type</parameter></methodparam>
<methodparam choice="opt"><type>bool</type><parameter>decode_binary</parameter></methodparam>
</methodsynopsis>
<para>
<function>sqlite_array_query</function> is similar to calling
<function>sqlite_query</function> and then
<function>sqlite_fetch_array</function> for each row of the result set
and storing it into an array, as shown in the example below. Calling
<function>sqlite_array_query</function> is significantly faster than
using such a script.
>>>>>>> 1.6
</para>
<example>
<title>
<function>sqlite_array_query</function> implemented yourself</title>
<programlisting role="php"><![CDATA[
<?php
$q = sqlite_query($dbhandle, "SELECT * from foo LIMIT 100");
$rows = array();
while ($r = sqlite_fetch_array($q)) {
$rows[] = $r;
}
?>
]]></programlisting>
</example>
<tip>
<para>
<function>sqlite_array_query</function> ______ ___º_ ________
________ __ 45 _____ . _____ ______ _____ ____ ____ _____ ____º___
<function>sqlite_unbuffered_query</function> ________ _______.
</para>
</tip>
<para>
___ __ <function>sqlite_query</function>,
<function>sqlite_fetch_array</function>,_
<function>sqlite_fetch_string</function>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
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
-->
Index: phpdoc-he/reference/sqlite/functions/sqlite-busy-timeout.xml
+++ phpdoc-he/reference/sqlite/functions/sqlite-busy-timeout.xml
<<<<<<< sqlite-busy-timeout.xml
<?xml version="1.0" encoding="windos-1255"?>
<!-- $Revision: 1.1 $ -->
=======
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
>>>>>>> 1.4
<refentry id="function.sqlite-busy-timeout">
<refnamediv><refname>sqlite_busy_timeout</refname>
<refpurpose>÷åáòú àå îðèøìú àú îùê æîï ääîúðä ìðúåðéí.</refpurpose>
</refnamediv>
<refsect1>
<title>úàåø</title>
<methodsynopsis>
<type>void</type><methodname>sqlite_busy_timeout</methodname>
<methodparam><type>resource</type><parameter>dbhandle</parameter></methodparam>
<methodparam><type>int</type><parameter>milliseconds</parameter></methodparam>
</methodsynopsis>
<para>
<<<<<<< sqlite-busy-timeout.xml
÷åáòú àú î÷ñéîåí äæîï á <parameter>milliseconds</parameter> ù SQLITE îçëä ì
<parameter>áñéñ äðúåðéí</parameter>
òã ùéäéä îåëï ìùéîåù .
÷áéòú <parameter>milliseconds</parameter> ë <literal>0</literal>,SQLITE
úçæéø àú äñèèåñ <literal>SQLITE_BUSY</literal> îééãéú , àí úåëðä àçøú
ðåòìú àú äðúåðéí ìòéãëåï.
=======
Set the maximum time that sqlite will wait for a
<parameter>dbhandle</parameter>
to become ready for use to <parameter>milliseconds</parameter>.
If <parameter>milliseconds</parameter> is <literal>0</literal>, busy
handlers will be disabled and sqlite will return immediately with a
<literal>SQLITE_BUSY</literal> status code if another process/thread has
the database locked for an update.
>>>>>>> 1.4
</para>
<para>
áøéøú äîçãì ùð÷áòú ò"é PHP ìäîúðä äåà 60 ùðéåú.
</para>
<note>
<para>
áùðéä éù 1000 àìôéåú ùðéä)åàðé ìà áãéå÷ áèåç ìîä àðé îúøâí âí àú äðúåï äæä(.
</para>
</note>
<para>
See also <function>sqlite_open</function>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
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
-->
Index: phpdoc-he/reference/sqlite/functions/sqlite-changes.xml
+++ phpdoc-he/reference/sqlite/functions/sqlite-changes.xml
<<<<<<< sqlite-changes.xml
<?xml version="1.0" encoding="windos-1255"?>
=======
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
>>>>>>> 1.5
<refentry id="function.sqlite-changes">
<refnamediv>
<refname>sqlite_changes</refname>
<refpurpose>
äôåð÷öéä îçæéøä àú îñôø äùåøåú ùùåðå áùàéìúú ä SQL äàçøåðä ùáåöòä.
</refpurpose>
<<<<<<< sqlite-changes.xml
</refnamediv>
<refsect1>
<title>úéàåø</title>
<methodsynopsis>
<type>int</type>
<methodname>sqlite_changes</methodname>
<methodparam>
<type>resource</type>
<parameter>db</parameter>
</methodparam>
</methodsynopsis>
<para>
îçæéøä àú îñôø äùåøåú ùùåðå ò"é éãé ùàéìú äSQL äàçøåðä ùáåöòä òì äðúåðéí.
=======
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>int</type><methodname>sqlite_changes</methodname>
<methodparam><type>resource</type><parameter>dbhandle</parameter></methodparam>
</methodsynopsis>
<para>
Returns the numbers of rows that were changed by the most recent SQL
statement executed against the <parameter>dbhandle</parameter> database
handle.
>>>>>>> 1.5
</para>
<para>
See also <function>sqlite_num_rows</function>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
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
-->
Index: phpdoc-he/reference/sqlite/functions/sqlite-close.xml
+++ phpdoc-he/reference/sqlite/functions/sqlite-close.xml
<<<<<<< sqlite-close.xml
<?xml version="1.0" encoding="windos-1255"?>
<!-- $Revision: 1.1 $ -->
=======
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
>>>>>>> 1.3
<refentry id="function.sqlite-close">
<refnamediv>
<refname>sqlite_close</refname>
<refpurpose>äôåð÷öéä ñåâøú áñéñ ðúåðéí ôúåç.</refpurpose>
</refnamediv>
<refsect1>
<title> úéàåø </title>
<methodsynopsis>
<type>void</type><methodname>sqlite_close</methodname>
<methodparam><type>resource</type><parameter>dbhandle</parameter></methodparam>
</methodsynopsis>
<para>
äôåð÷öéä ñåâøú àú áñéñ äðúåðéí, àí áñéñ äðúåðéí äéä áîöá persistent ,äôåð÷öéä úñéø àåúå îäøùéîä ùì áñéñé äðúåðéí áîöá æä.
persistent list.
</para>
<para>
øàä âí <function>sqlite_open</function> å <function>sqlite_popen</function>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
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
-->
Index: phpdoc-he/reference/sqlite/functions/sqlite-column.xml
+++ phpdoc-he/reference/sqlite/functions/sqlite-column.xml
<?xml version="1.0" encoding="WINDOWS-1255"?><!-- $Revision: 1.1 $ -->
<refentry id="function.sqlite-column">
<refnamediv>
<refname>sqlite_column</refname>
<refpurpose>Fetches a column from the current row of a result set.</refpurpose>
</refnamediv>
<refsect1>
<title>úéàåø</title>
<methodsynopsis>
<type>mixed</type><methodname>sqlite_column</methodname>
<methodparam><type>resource</type><parameter>result</parameter></methodparam>
<methodparam><type>mixed</type><parameter>index_or_name</parameter></methodparam>
<methodparam choice="opt"><type>bool</type><parameter>decode_binary</parameter></methodparam>
</methodsynopsis>
<para>
îáéàä àú ùí äòîåãä <parameter>index_or_name</parameter> àå àú äîñôø äñéãåøé ùìä îäùåøä äðåëçéú ùì èáìú äúåöàåú.
äãâì äáðàøé îúô÷ã áàåúä öåøä ëîå áôåð÷öéä
<function>sqlite_fetch_array</function>.
</para>
<para>
äùúîù áôåð÷öéä àí àúä î÷áì úåöàåú òí äøáä òîåãåú, àå áî÷øä åéù ìê òîåãåú òí äøáä ðåúðéí áëì òîåãä.
</para>
<para>
øàä âí <function>sqlite_fetch_string</function>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
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
-->
Index: phpdoc-he/reference/sqlite/functions/sqlite-create-aggregate.xml
+++ phpdoc-he/reference/sqlite/functions/sqlite-create-aggregate.xml
<<<<<<< sqlite-create-aggregate.xml
<?xml version="1.0" encoding="WINDOWS-1255"?>
=======
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
>>>>>>> 1.3
<refentry id="function.sqlite-create-aggregate">
<<<<<<< sqlite-create-aggregate.xml
<refnamediv>
<refname>sqlite_create_aggregate</refname>
<refpurpose> äôåð÷öéä îàôùøú øéùåí ôåð÷öéåú UDF (ôåð÷öéåú àéùéåú ùì äîùúîù(, öåáøåú , ìùéîåù áùàéìúåú SQL . </refpurpose>
</refnamediv>
<refsect1>
<title>úéàåø</title>
<methodsynopsis>
<type>bool</type>
<methodname>sqlite_create_aggregate</methodname>
<methodparam>
<type>resource</type>
<parameter>db</parameter>
</methodparam>
<methodparam>
<type>string</type>
<parameter>function_name</parameter>
</methodparam>
<methodparam>
<type>mixed</type>
<parameter>step_func</parameter>
</methodparam>
<methodparam>
<type>mixed</type>
<parameter>finalize_func</parameter>
</methodparam>
<methodparam choice="opt">
<type>int</type>
<parameter>num_args</parameter>
</methodparam>
</methodsynopsis>
<para>
<function>sqlite_create_aggregate</function>äéà î÷áéìä ì<function>sqlite_create_function</function> àìà ùäéà îàôùøú ìéöåø ôå÷öéåú , ùîçùáåú úåöàåú ùðöáøå ìàåøê ëì äùåøåú úùåáä ùì äùàéìúä</para>
<para>ääáäãì äòé÷øé áéï äôåð÷öéä äæàú ìôåð÷öéä<function>sqlite_create_function</function>äåà ùãøåùåú ùúé ôåð÷öéåú ìðäì öáéøú ðúåðéí<parameter>step_func</parameter> äéà ôåð÷öéä ùîôòéìä çéùåá òì ëì ùåøä áúåöàåú, åäúåöàä ùìä àîåøä ìäéùîø áîùúðä öåáø. àçøé ùäùàéìúä ñééîä ìøåõ , ÷åøàéí ìôåð÷öéä<parameter>finalize_func</parameter> åäéà îçæéøä àú äòøê ùðöáø îëì ùåøåú äùàéìúä, àçøé áéöåò ôòåìú òéáåã øöåéä</para>
<para>
<example>
<title>max_length aggregation function example</title>
<programlisting role="php"><![CDATA[
=======
<refnamediv>
<refname>sqlite_create_aggregate</refname>
<refpurpose>Register an aggregating UDF for use in SQL statements.</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>bool</type><methodname>sqlite_create_aggregate</methodname>
<methodparam><type>resource</type><parameter>dbhandle</parameter></methodparam>
<methodparam><type>string</type><parameter>function_name</parameter></methodparam>
<methodparam><type>mixed</type><parameter>step_func</parameter></methodparam>
<methodparam><type>mixed</type><parameter>finalize_func</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>num_args</parameter></methodparam>
</methodsynopsis>
<para>
<function>sqlite_create_aggregate</function> is similar to
<function>sqlite_create_function</function> except that it registers
functions that can be used to calculate a result aggregated across all the
rows of a query.
</para>
<para>
The key difference between this function and
<function>sqlite_create_function</function> is that two functions are
required to manage the aggregate; <parameter>step_func</parameter> is
called for each row of the result set. Your PHP function should
accumulate the result and store it into the aggregation context.
Once all the rows have been processed,
<parameter>finalize_func</parameter> will be called and it should then
take the data from the aggregation context and return the result.
</para>
<para>
<example>
<title>max_length aggregation function example</title>
<programlisting role="php">
<![CDATA[
>>>>>>> 1.3
<?php
$data = array(
'one',
'two',
'three',
'four'
'five'
'six',
'seven',
'eight',
'nine'
'ten'
);
$dbhandle = sqlite_open(':memory:');
sqlite_query($dbhandle, "CREATE TABLE strings(a)");
foreach ($data as $str) {
$str = sqlite_escape_string($str);
sqlite_query($dbhandle, "INSERT INTO strings VALUES ('$str')");
}
function max_len_step(&$context, $string) {
if (strlen($string) > $context) {
$context = strlen($string);
}
}
function max_len_finalize(&$context) {
return $context;
}
sqlite_create_aggregate($dbhandle, 'max_len', 'max_len_step', 'max_len_finalize');
var_dump(sqlite_array_query($dbhandle, 'SELECT max_len(a) from strings'));
?>
]]></programlisting>
</example>
</para>
<para>áãåâîä éöøðå ôåð÷öéä öåáøú, ùîçùáú àú äàåøê ùì äîçøåæú äàøåëä áéåúø áàçã îùãåú äèáìä. àðçðå ÷åøàéí ìôåð÷öéä
<literal>max_len_step</literal>òáåø ëì ùåøä îùåøåú äèáìä, ëùäôå÷öéä îòáéøä àú ä function is
<parameter>context</parameter> ùäåà ôøîèø ëì ëîå ôøîèø áphp ,ëàï äåà ôùåè îçæé÷ àú äàåøê ùì áîçøåæú äàøåëä áéåúø, àáì äåà éëåì ìùîù ëîòøê åàôéìå ëòöí àí ðøöä. àí äîçøåæú ùìðå àøåëä éåúø .îäîçøåæú äòëùåéú, äéà úùîø ëîçøåæú äàøåëä áéåúø</para>
<para>àçøé òéáåã ùì ëì äùåøåú
, SQLite ÷åøàú ìôåð÷öéä
<literal>max_len_finalize</literal> áùáéì äòéáåã äñåôé ùì äúåöàä, áî÷øä ùìðå ìà ðãøù ùåí òéáåã ðåñó àáì éëåìðå ìîùì ìäåöéà ùåøù îäàåøê ùì äîçøåæú, àí äéä îúçù÷ ìðå, àå ìáãå÷ ëîä ôòîéí îåæëø äùí àáøäí áôðéí.</para>
<note>
<para>äôå÷öéä òìåìä ìà ìòáåã äéèá, áî÷øä ùì ðúåðéí áéðàøééí, áîöá ëæä úï îáè áîãøéê ùì äôåð÷öéä <function>sqlite_udf_decode_binary</function>ò"î ìäáéï ìîä æä ÷åøä, åîä ìòùåú áî÷øä ëæä. </para>
</note>
<tip>
<para>îàåã ìà îîåìõ ìùîåø òåìú÷ ùì äòøê ùôåð÷öéú ä
context, îàçø åæä òìåì ìâøåí ìáæáåæ æëøåï øöéðé ò"é SQLite .
</para>
</tip>
<tip>
<para>ðéúï ìäùúîù áôåð÷öéåú<function>sqlite_create_function</function> å
<function>sqlite_create_aggregate</function>ìøîåñ ôå÷öéåú SQL ùì SQLite </para>
</tip>
<para>øàä âí<function>sqlite_create_function</function>,
<function>sqlite_udf_encode_binary</function> å
<function>sqlite_udf_decode_binary</function>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
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
-->
Index: phpdoc-he/reference/sqlite/functions/sqlite-create-function.xml
+++ phpdoc-he/reference/sqlite/functions/sqlite-create-function.xml
<<<<<<< sqlite-create-function.xml
<?xml version="1.0" encoding="WINDOWS-1255"?><!-- $Revision: 1.1 $ -->
=======
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
>>>>>>> 1.6
<refentry id="function.sqlite-create-function">
<refnamediv>
<refname>sqlite_create_function</refname>
<refpurpose>
äôå÷öéä îùìáú ôåð÷öéåú ùì äîùúîù ìùéîåù áùàéìúåú
SQL .
</refpurpose>
</refnamediv>
<refsect1>
<title>úéàåø</title>
<methodsynopsis>
<type>bool</type><methodname>sqlite_create_function</methodname>
<methodparam><type>resource</type><parameter>dbhandle</parameter></methodparam>
<methodparam><type>string</type><parameter>function_name</parameter></methodparam>
<methodparam><type>mixed</type><parameter>callback</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>num_args</parameter></methodparam>
</methodsynopsis>
<para>
<<<<<<< sqlite-create-function.xml
<function>sqlite_create_function</function>
îàôùøú ìê ìøùåí ôåð÷öéåú
PHP
áùéìåá òí
SQLite ,
áãåîä ì
<acronym>UDF</acronym> (User Defined Function),
ëê ùðéúï éäéä ìäùúîù áäí îúåê ùàéìúåú
SQL.
</para>
<para>
<parameter>db</parameter>
îöééï àú äáñéñ äðúåðéí ùëìôéå úúáöò ääøçáä,
<parameter>function_name</parameter>
îöééï àú ùí äôåð÷öéä ùáøöåðê ìäåñéó ,
<parameter>callback</parameter>
äùí ùì ôåð÷öéú ä
PHP .
äôøîèø äàåôöéåðàìé
<parameter>num_args</parameter>
îøîæ ì îôòðç ùì ä-
SQLite,
òì îñôø äôøîèøéí ùäôåðöéä ú÷áì, îåîìõ ìà ìäúùîù áôøîèø æä, àìà ëï äôåð÷öéä ùìê î÷áìú îñôø îåâãø åîåçìè ùì ôøîèøéí.
</para>
=======
<function>sqlite_create_function</function> allows you to register a PHP
function with SQLite as an <acronym>UDF</acronym> (User Defined
Function), so that it can be called from within your SQL
statements.
</para>
<para>
<parameter>dbhandle</parameter> specifies the database handle that you
wish to extend, <parameter>function_name</parameter> specifies the name
of the function that you will use in your SQL statements,
<parameter>callback</parameter> is any valid PHP callback to specify a
PHP function that should be called to handle the SQL function.
The optional parameter <parameter>num_args</parameter> is used as a hint
by the SQLite expression parser/evaluator. It is recommended that you
specifiy a value if your function will only ever accept a fixed number of
parameters.
</para>
>>>>>>> 1.6
<para>
ðéúï ìäúùîù áôåð÷öéä áëì çì÷ ùì ùàéìúú
SQL ,
ùéëåìä ì÷øåà ìôåð÷öéåú, ìîùì:
SELECT
àå
UPDATE ,
àå áùéîåù áèøéâøéí.
</para>
<para>
<example>
<title><function>sqlite_create_function</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
function md5_and_reverse($string) {
return strrev(md5($string));
}
if ($dbhandle = sqlite_open('mysqlitedb', 0666, $sqliteerror)) {
sqlite_create_function($dbhandle, 'md5rev', 'md5_and_reverse', 1);
$sql = 'SELECT md5rev(filename) FROM files';
$rows = sqlite_array_query($dbhandle, $sql);
} else {
echo 'Error opening sqlite db: ' . $sqliteerror;
exit;
}
?>
]]>
</programlisting>
</example>
</para>
<para>
áãåâîà éù ìðå ôå÷öéä ùîçùáú àú ä-
md5
ùì îçøåæú åàæ äåôëú àåúä
ëùùàéìúú ä
SQL
îáöòú àú äôåð÷öéä, ùí ä÷åáõ ùéú÷áì áúåê
<parameter>$rows</parameter>
éú÷áì áöåøä îòåáãú.
</para>
<para>
ò"é ùéîåù áèëðé÷ä äæàú çñëðå àú äöåøê ìäùúîù áìåìàä ëãåâîú -
foreach() ,
å÷éáìðå àú äôìè îòåáã éùø îáñéñ äðúåðéí.
</para>
<para>
òì îðú ìäúùîù áôåð÷öéåú
PHP
àéï öåøê ìäùúîù áôåð÷öéä
<function>sqlite_create_function</function>,
áòú ôúéçú áñéñ äðúåðéí ðåöøú ôåð÷öééú <literal>php</literal> ,
ùáòæøúä àôùø ì÷øåà ìëì ôåð÷öéåú
PHP.
</para>
<para>
<example>
<title>Example of using the PHP function</title>
<programlisting role="php">
<![CDATA[
<?php
$rows = sqlite_array_query($dbhandle, "SELECT php('md5', filename) from files");
?>
]]>
</programlisting>
<para>
äãåâîà äæàú ú÷øà ìôåð÷öéä <function>md5</function> , òáåø ëì <literal>filename</literal>,
åäúåöàåú éåëðñå ì <parameter>$rows</parameter>.
</para>
</example>
</para>
<note>
<para>
PHP
ìà úùúîù áöåøä àåèåîèéú áôåð÷öéåú
UDF
ùì äîùúîù, áî÷øä ùì ðúåðéí áéðàøééí, áâìì ùé÷åì ùì áéöåòéí.
ëãàé ìäùúîù áôåð÷öéåú àìä ðãøùú äúòøáåú ùì äîúëðú.
ìôøèéí ðåñôéí äñúëì áôåð÷öéåú
<function>sqlite_udf_encode_binary</function>
å<function>sqlite_udf_decode_binary</function> .
</para>
</note>
<tip>
<para>
áëì àåôï ìà îîåìõ ìäùúîù áôåð÷öéåú
UDF
ìòéáåã ðúåðéí áéðàøééí, àìà àí ëï àéï çùéáåú ìîäéøåú òáåãú äàôìé÷öéä
</para>
</tip>
<tip>
<para>
àúä éëåì ìäùúîù áôåð÷öéåú
<function>sqlite_create_function</function> å
<function>sqlite_create_aggregate</function>ìøîåñ ôåð÷öéåú
SQL á SQLite