mirror of
https://github.com/macintoshplus/doc-fr.git
synced 2026-03-26 18:02:17 +01:00
git-svn-id: https://svn.php.net/repository/phpdoc/fr/trunk@147508 c90b9560-bf6c-de11-be94-00142212c4b1
74 lines
2.3 KiB
XML
74 lines
2.3 KiB
XML
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
<!-- $Revision: 1.5 $ -->
|
|
<refentry id="function.sqlite-array-query">
|
|
<refnamediv>
|
|
<refname>sqlite_array_query</refname>
|
|
<refpurpose>
|
|
Exécute une requête SQL avec SQLite et retourne un tableau
|
|
</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> est similaire à
|
|
<function>sqlite_query</function> suivi de
|
|
<function>sqlite_fetch_array</function> pour chaque ligne de résultat,
|
|
et en les plaçant dans un tableau. Appeler <function>sqlite_array_query</function>
|
|
est plus rapide que de programmer cette séquence dans un script &php;.
|
|
</para>
|
|
<example>
|
|
<title><function>sqlite_array_query</function> traditionnel</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
$q = sqlite_query($database, "SELECT * from foo LIMIT 100");
|
|
$rows = array();
|
|
while ($r = sqlite_fetch_array($q)) {
|
|
$rows[] = $r;
|
|
}
|
|
?>]]>
|
|
</programlisting>
|
|
</example>
|
|
<tip>
|
|
<para>
|
|
<function>sqlite_array_query</function> est bien adapté pour des
|
|
requêtes qui retournent jusqu'à 45 lignes. Si vous avez plus
|
|
de données, il est recommandé d'utiliser
|
|
<function>sqlite_unbuffered_query</function> pour optimiser les performances.
|
|
</para>
|
|
</tip>
|
|
<para>
|
|
Voir aussi
|
|
<function>sqlite_query</function>,
|
|
<function>sqlite_fetch_array</function> et
|
|
<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
|
|
-->
|