downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

Our source is open

The syntax highlighted source is automatically generated by PHP from the plaintext script. If you're interested in what's behind the several functions we used, you can always take a look at the source of the following files:

Of course, if you want to see the source of this page, we have it available. You can also browse the SVN repository for this website on svn.php.net.

Source of: /manual/en/function.mssql-rows-affected.php

<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$PARENTS = array();
include_once
dirname(__FILE__) ."/toc/ref.mssql.inc";
$setup = array (
 
'home' =>
  array (
   
0 => 'index.php',
   
1 => 'PHP Manual',
  ),
 
'head' =>
  array (
   
0 => 'UTF-8',
   
1 => 'en',
  ),
 
'this' =>
  array (
   
0 => 'function.mssql-rows-affected.php',
   
1 => 'mssql_rows_affected',
  ),
 
'up' =>
  array (
   
0 => 'ref.mssql.php',
   
1 => 'Mssql Functions',
  ),
 
'prev' =>
  array (
   
0 => 'function.mssql-result.php',
   
1 => 'mssql_result',
  ),
 
'next' =>
  array (
   
0 => 'function.mssql-select-db.php',
   
1 => 'mssql_select_db',
  ),
);
$setup["toc"] = $TOC;
$setup["parents"] = $PARENTS;
manual_setup($setup);

manual_header();
?>
<div id="function.mssql-rows-affected" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">mssql_rows_affected</h1>
  <p class="verinfo">(PHP 4 &gt;= 4.0.4, PHP 5, PECL odbtp &gt;= 1.1.1)</p><p class="refpurpose"><span class="refname">mssql_rows_affected</span> &mdash; <span class="dc-title">Returns the number of records affected by the query</span></p>

 </div>
 
 <a name="function.mssql-rows-affected.description"></a><div class="refsect1 description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="type">int</span> <span class="methodname"><b>mssql_rows_affected</b></span>
    ( <span class="methodparam"><span class="type">resource</span> <tt class="parameter">$link_identifier</tt></span>
   )</div>

  <p class="para rdfs-comment">
   Returns the number of records affected by the last write query.
  </p>
 </div>


 <a name="function.mssql-rows-affected.parameters"></a><div class="refsect1 parameters">
  <h3 class="title">Parameters</h3>
  <p class="para">
   </p><dl>

    <dt class="varlistentry">

     <span class="term"><i><tt class="parameter">link_identifier</tt></i>
</span>

     </dt><dd class="listitem">

      <p class="para">
       A MS SQL link identifier, returned by
       <a href="function.mssql-connect.php" class="function">mssql_connect()</a> or
       <a href="function.mssql-pconnect.php" class="function">mssql_pconnect()</a>.
      </p>
     </dd>

   
   </dl>
<p>
  </p>
 </div>


 <a name="function.mssql-rows-affected.returnvalues"></a><div class="refsect1 returnvalues">
  <h3 class="title">Return Values</h3>
  <p class="para">
   Returns the number of records affected by last operation.
  </p>
 </div>


 <a name="function.mssql-rows-affected.examples"></a><div class="refsect1 examples">
  <h3 class="title">Examples</h3>
  <p class="para">
   </p><div class="example">
    <p><b>Example #1 <b>mssql_rows_affected()</b> example</b></p>
    <div class="example-contents programlisting">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br /></span><span style="color: #FF8000">//&nbsp;Delete&nbsp;all&nbsp;rows&nbsp;in&nbsp;a&nbsp;table<br /></span><span style="color: #0000BB">mssql_query</span><span style="color: #007700">(</span><span style="color: #DD0000">'TRUNCATE&nbsp;TABLE&nbsp;[php].[dbo].[persons]'</span><span style="color: #007700">);<br /><br />echo&nbsp;</span><span style="color: #DD0000">'Deleted&nbsp;'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">mssql_rows_affected</span><span style="color: #007700">(</span><span style="color: #0000BB">$link</span><span style="color: #007700">)&nbsp;.&nbsp;</span><span style="color: #DD0000">'&nbsp;row(s)'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
    </div>

   </div><p>
  </p>
 </div>


</div><?php manual_footer(); ?>
 
show source | credits | sitemap | contact | advertising | mirror sites