cvs: phpdoc-hu /reference/sqlite/functions sqlite-array-query.xml
| From: | Cece) Szabolcs | Date: | Sat, 07 Aug 2004 11:18:15 +0000 |
| Subject: | cvs: phpdoc-hu /reference/sqlite/functions sqlite-array-query.xml | ||
| Groups: | php.doc.hu | ||
| Request: | Send a blank email to doc-hu+get-931@lists.php.net to get a copy of this message | ||
cece Sat Aug 7 07:18:15 2004 EDT
Added files:
/phpdoc-hu/reference/sqlite/functions sqlite-array-query.xml
Log:
added to hu tree
http://cvs.php.net/co.php/phpdoc-hu/reference/sqlite/functions/sqlite-array-query.xml?r=1.1&p=1
Index: phpdoc-hu/reference/sqlite/functions/sqlite-array-query.xml
+++ phpdoc-hu/reference/sqlite/functions/sqlite-array-query.xml
<?xml version="1.0" encoding="iso-8859-2"?>
<!-- EN-Revision: 1.8 Maintainer: cece Status: ready -->
<refentry id="function.sqlite-array-query">
<refnamediv>
<refname>sqlite_array_query</refname>
<refpurpose>Végrehajt egy SQL kérés az adott adatbázison, az eredményt tömbben
visszaadva</refpurpose>
</refnamediv>
<refsect1>
<title>Leírás</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>
<methodsynopsis>
<type>array</type><methodname>sqlite_array_query</methodname>
<methodparam><type>string</type><parameter>query</parameter></methodparam>
<methodparam><type>resource</type><parameter>dbhandle</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>
Az <function>sqlite_array_query</function> alkalmazása megfelel egy
<function>sqlite_query</function>, majd egy ezt követõ ciklikus
<function>sqlite_fetch_array</function> hívássorozatnak, amely
egy tömböt épít fel. A visszaadott tömb minden egyes sora egy, a rekordot
tartalmazó tömböt tartalmaz. A következõ kódrészlet is azt példázza,
mit is cserélhetünk le e sokszor zzel az egy függvényhívással. Az
<function>sqlite_array_query</function> hívása jóval gyorsabb eredményt
hoz, mint a lenti kódrészlet.
</para>
<example>
<title><function>sqlite_array_query</function> sajátkezûleg</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>
Az <function>sqlite_array_query</function> leginkább a 45 vagy kevesebb
sort tartalmazó eredménylistákhoz nyújt hatékony segítséget. Ha ennél
több rekordot szeretél megmozgatni, érdemesebb inkább saját kódot
írni az adatsorok szekvenciális lekérésére, kombinálva az
<function>sqlite_unbuffered_query</function> függvénnyel. Ez a módszer
ilyenkor sokkal erõforrástakarékosabb.
</para>
</tip>
<para>
Lásd még:
<function>sqlite_query</function>,
<function>sqlite_fetch_array</function> és
<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
-->