2002-04-15 00:12:54 +00:00
|
|
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
2009-07-11 07:01:54 +00:00
|
|
|
<!-- $Revision$ -->
|
2007-06-20 22:25:43 +00:00
|
|
|
<refentry xml:id="function.fbsql-num-rows" xmlns="http://docbook.org/ns/docbook">
|
2007-01-21 15:43:04 +00:00
|
|
|
<refnamediv>
|
|
|
|
<refname>fbsql_num_rows</refname>
|
|
|
|
<refpurpose>Get number of rows in result</refpurpose>
|
|
|
|
</refnamediv>
|
2007-01-22 00:22:11 +00:00
|
|
|
|
|
|
|
<refsect1 role="description">
|
2007-01-21 15:43:04 +00:00
|
|
|
&reftitle.description;
|
|
|
|
<methodsynopsis>
|
|
|
|
<type>int</type><methodname>fbsql_num_rows</methodname>
|
|
|
|
<methodparam><type>resource</type><parameter>result</parameter></methodparam>
|
|
|
|
</methodsynopsis>
|
|
|
|
<para>
|
2007-01-22 00:22:11 +00:00
|
|
|
Gets the number of rows in the given <parameter>result</parameter> set.
|
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
This function is only valid for SELECT statements. To retrieve the number
|
|
|
|
of rows returned from a INSERT, UPDATE or DELETE query, use
|
|
|
|
<function>fbsql_affected_rows</function>.
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1 role="parameters">
|
|
|
|
&reftitle.parameters;
|
|
|
|
<para>
|
|
|
|
<variablelist>
|
|
|
|
&fbsql.result.description;
|
|
|
|
</variablelist>
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1 role="returnvalues">
|
|
|
|
&reftitle.returnvalues;
|
|
|
|
<para>
|
|
|
|
Returns the number of rows returned by the last SELECT statement.
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1 role="examples">
|
|
|
|
&reftitle.examples;
|
|
|
|
<para>
|
2007-01-21 15:43:04 +00:00
|
|
|
<example>
|
|
|
|
<title><function>fbsql_num_rows</function> example</title>
|
|
|
|
<programlisting role="php">
|
2002-04-15 00:12:54 +00:00
|
|
|
<![CDATA[
|
|
|
|
<?php
|
|
|
|
|
2007-01-21 15:43:04 +00:00
|
|
|
$link = fbsql_connect("localhost", "username", "password");
|
2002-04-15 00:12:54 +00:00
|
|
|
fbsql_select_db("database", $link);
|
|
|
|
|
2007-01-21 15:43:04 +00:00
|
|
|
$result = fbsql_query("SELECT * FROM table1;", $link);
|
|
|
|
$num_rows = fbsql_num_rows($result);
|
2002-04-15 00:12:54 +00:00
|
|
|
|
|
|
|
echo "$num_rows Rows\n";
|
|
|
|
|
|
|
|
?>
|
|
|
|
]]>
|
2007-01-21 15:43:04 +00:00
|
|
|
</programlisting>
|
|
|
|
</example>
|
|
|
|
</para>
|
2007-01-22 00:22:11 +00:00
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1 role="seealso">
|
|
|
|
&reftitle.seealso;
|
2007-01-21 15:43:04 +00:00
|
|
|
<para>
|
2007-01-22 00:22:11 +00:00
|
|
|
<simplelist>
|
|
|
|
<member><function>fbsql_affected_rows</function></member>
|
|
|
|
<member><function>fbsql_connect</function></member>
|
|
|
|
<member><function>fbsql_select_db</function></member>
|
|
|
|
<member><function>fbsql_query</function></member>
|
|
|
|
</simplelist>
|
2007-01-21 15:43:04 +00:00
|
|
|
</para>
|
|
|
|
</refsect1>
|
2007-01-22 00:22:11 +00:00
|
|
|
|
2007-01-21 15:43:04 +00:00
|
|
|
</refentry>
|
2002-04-15 00:12:54 +00:00
|
|
|
|
|
|
|
<!-- 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
|
2009-09-25 07:04:39 +00:00
|
|
|
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
2002-04-15 00:12:54 +00:00
|
|
|
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
|
|
|
|
-->
|