<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.yaz.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'de',
  ),
  'this' => 
  array (
    0 => 'function.yaz-hits.php',
    1 => 'yaz_hits',
    2 => 'Returns number of hits for last search',
  ),
  'up' => 
  array (
    0 => 'ref.yaz.php',
    1 => 'YAZ Funktionen',
  ),
  'prev' => 
  array (
    0 => 'function.yaz-get-option.php',
    1 => 'yaz_get_option',
  ),
  'next' => 
  array (
    0 => 'function.yaz-itemorder.php',
    1 => 'yaz_itemorder',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/yaz/functions/yaz-hits.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.yaz-hits" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">yaz_hits</h1>
  <p class="verinfo">(PHP 4 &gt;= 4.0.1, PECL yaz &gt;= 0.9.0)</p><p class="refpurpose"><span class="refname">yaz_hits</span> &mdash; <span class="dc-title">Returns number of hits for last search</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-function.yaz-hits-description">
  <h3 class="title">Beschreibung</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>yaz_hits</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.resource.php" class="type resource">resource</a></span> <code class="parameter">$id</code></span>, <span class="methodparam"><span class="type"><a href="language.types.array.php" class="type array">array</a></span> <code class="parameter reference">&$searchresult</code><span class="initializer"> = ?</span></span>): <span class="type"><a href="language.types.integer.php" class="type int">int</a></span></div>

  <p class="para rdfs-comment">
   <span class="function"><strong>yaz_hits()</strong></span> returns the number of hits for the last
   search. 
  </p>
 </div>

 <div class="refsect1 parameters" id="refsect1-function.yaz-hits-parameters">
  <h3 class="title">Parameter-Liste</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">id</code></dt>
     <dd>
      <p class="para">
       The connection resource returned by <span class="function"><a href="function.yaz-connect.php" class="function">yaz_connect()</a></span>.
      </p>
     </dd>
    
    
     <dt><code class="parameter">searchresult</code></dt>
     <dd>
      <p class="para">
       Result array for detailed search result information.
      </p>
     </dd>
    
   </dl>
  </p>
 </div>

 <div class="refsect1 returnvalues" id="refsect1-function.yaz-hits-returnvalues">
  <h3 class="title">Rückgabewerte</h3>
  <p class="para">
   Returns the number of hits for the last search or 0 if no search was 
   performed.
  </p>
  <p class="para">
   The search result array (if supplied) holds information that
   is returned by a Z39.50 server in the SearchResult-1
   format part of a search response.
   The SearchResult-1 format can be used to obtain information
   about hit counts for various parts of the query (subquery).
   In particular, it is possible to obtain hit counts for the individual
   search terms in a query. Information for first
   subquery is in $array[0], second subquery in $array[1], and so forth.
  </p>
  <table class="doctable table">
   <caption><strong>searchresult members</strong></caption>
   
    <col width="1*" />
    <col width="2*" />
    <thead>
     <tr>
      <th>Element</th>
      <th>Description</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
      <td><code class="literal">id</code></td>
      <td>Sub query ID2 (string)</td>
     </tr>

     <tr>
      <td><code class="literal">count</code></td>
      <td>Result count / hits (integer)</td>
     </tr>

     <tr>
      <td><code class="literal">subquery.term</code></td>
      <td>Sub query term (string)</td>
     </tr>

     <tr>
      <td><code class="literal">interpretation.term</code></td>
      <td>Interpretated sub query term (string)</td>
     </tr>

     <tr>
      <td><code class="literal">recommendation.term</code></td>
      <td>Recommended sub query term (string)</td>
     </tr>

    </tbody>
   
  </table>
     
  <blockquote class="note"><p><strong class="note">Hinweis</strong>: 
   <p class="para">
    The SearchResult facility requires PECL YAZ 1.0.5
    or later and YAZ 2.1.9 or later.
   </p>
  </p></blockquote>
  <blockquote class="note"><p><strong class="note">Hinweis</strong>: 
   <p class="para">
    Very few Z39.50 implementations support the SearchResult facility.
   </p>
  </p></blockquote>
 </div>

</div><?php manual_footer($setup); ?>