Sophie

Sophie

distrib > Mandriva > 9.1 > ppc > by-pkgid > a34ed6838d4b29d38abd504392a4a797 > files > 2388

php-manual-es-4.3.0-2mdk.noarch.rpm

<HTML
><HEAD
><TITLE
>sesam_affected_rows</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
REL="HOME"
TITLE="Manual de PHP"
HREF="index.html"><LINK
REL="UP"
TITLE="SESAM database functions"
HREF="ref.sesam.html"><LINK
REL="PREVIOUS"
TITLE="SESAM database functions"
HREF="ref.sesam.html"><LINK
REL="NEXT"
TITLE="sesam_commit"
HREF="function.sesam-commit.html"><META
HTTP-EQUIV="Content-type"
CONTENT="text/html; charset=ISO-8859-1"></HEAD
><BODY
CLASS="refentry"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>Manual de PHP</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="ref.sesam.html"
ACCESSKEY="P"
>Anterior</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="function.sesam-commit.html"
ACCESSKEY="N"
>Siguiente</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><H1
><A
NAME="function.sesam-affected-rows"
></A
>sesam_affected_rows</H1
><DIV
CLASS="refnamediv"
><A
NAME="AEN68976"
></A
><P
>    (PHP 3 CVS only)</P
>sesam_affected_rows&nbsp;--&nbsp;
     Get number of rows affected by an immediate query
    </DIV
><DIV
CLASS="refsect1"
><A
NAME="AEN68979"
></A
><H2
>Description</H2
>int <B
CLASS="methodname"
>sesam_affected_rows</B
> ( string result_id)<BR
></BR
><P
>&#13;     <TT
CLASS="parameter"
><I
>result_id</I
></TT
> is a valid result id returned by
     <A
HREF="function.sesam-query.html"
><B
CLASS="function"
>sesam_query()</B
></A
>.
    </P
><P
>&#13;     Returns the number of rows affected by a query associated with
     <TT
CLASS="parameter"
><I
>result_id</I
></TT
>.
    </P
><P
>&#13;     The <B
CLASS="function"
>sesam_affected_rows()</B
> function can only
     return useful values when used in combination with "immediate"
     SQL statements (updating operations like
     <TT
CLASS="literal"
>INSERT</TT
>, <TT
CLASS="literal"
>UPDATE</TT
> and
     <TT
CLASS="literal"
>DELETE</TT
>) because SESAM does not deliver any
     "affected rows" information for "select type" queries.  The
     number returned is the number of affected rows.
    </P
><P
>&#13;     See also: <A
HREF="function.sesam-query.html"
><B
CLASS="function"
>sesam_query()</B
></A
> and
     <A
HREF="function.sesam-execimm.html"
><B
CLASS="function"
>sesam_execimm()</B
></A
>
    </P
><DIV
CLASS="informalexample"
><A
NAME="AEN69000"
></A
><P
></P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
CELLPADDING="5"
><TR
><TD
><PRE
CLASS="php"
>$result = sesam_execimm ("DELETE FROM PHONE WHERE LASTNAME = '".strtoupper ($name)."'");
if (!$result) {
    ... error ...
}
print sesam_affected_rows ($result).
    " entries with last name ".$name." deleted.\n"</PRE
></TD
></TR
></TABLE
><P
></P
></DIV
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="ref.sesam.html"
ACCESSKEY="P"
>Anterior</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Inicio</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="function.sesam-commit.html"
ACCESSKEY="N"
>Siguiente</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>SESAM database functions</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="ref.sesam.html"
ACCESSKEY="U"
>Subir</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>sesam_commit</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>