Sophie

Sophie

distrib > Mageia > 4 > i586 > by-pkgid > f800694edefe91adea2624f711a41a2d > files > 9443

php-manual-en-5.5.7-1.mga4.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Gives the database a hint about the query</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="mongocursor.hasnext.html">MongoCursor::hasNext</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="mongocursor.immortal.html">MongoCursor::immortal</a></div>
 <div class="up"><a href="class.mongocursor.html">MongoCursor</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="mongocursor.hint" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">MongoCursor::hint</h1>
  <p class="verinfo">(PECL mongo &gt;=0.9.0)</p><p class="refpurpose"><span class="refname">MongoCursor::hint</span> &mdash; <span class="dc-title">Gives the database a hint about the query</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-mongocursor.hint-description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type"><a href="class.mongocursor.html" class="type MongoCursor">MongoCursor</a></span> <span class="methodname"><strong>MongoCursor::hint</strong></span>
    ( <span class="methodparam"><span class="type"><a href="language.pseudo-types.html#language.types.mixed" class="type mixed">mixed</a></span> <code class="parameter">$index</code></span>
   )</div>

 </div>


 <div class="refsect1 parameters" id="refsect1-mongocursor.hint-parameters">
  <h3 class="title">Parameters</h3>
  <p class="para">
   <dl>

    <dt>

     <span class="term">
      <em><code class="parameter">index</code></em>
     </span>
     <dd>

      <p class="para">
       Index to use for the query. If a string is passed, it should correspond
       to an index name. If an array or object is passed, it should correspond
       to the specification used to create the index (i.e. the first argument
       to  <span class="function"><a href="mongocollection.ensureindex.html" class="function">MongoCollection::ensureIndex()</a></span>).
      </p>
     </dd>

    </dt>
   
   </dl>

  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-mongocursor.hint-returnvalues">
  <h3 class="title">Return Values</h3>  
  <p class="para">
   Returns this cursor.
  </p>
 </div>


 <div class="refsect1 errors" id="refsect1-mongocursor.hint-errors">
  <h3 class="title">Errors/Exceptions</h3>
  <p class="para">
   Throws <a href="class.mongocursorexception.html" class="classname">MongoCursorException</a> if this cursor has started iterating.
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-mongocursor.hint-changelog">
  <h3 class="title">Changelog</h3>
  <p class="para">
   <table class="doctable informaltable">
    
     <thead>
      <tr>
       <th>Version</th>
       <th>Description</th>
      </tr>

     </thead>

     <tbody class="tbody">
      <tr>
       <td>1.4.0</td>
       <td>
        <p class="para">
         The <em><code class="parameter">index</code></em> argument now supports index names as
         string values. In versions before 1.4.0, only array or object values
         were accepted.
        </p>
       </td>
      </tr>

     </tbody>
    
   </table>

  </p>
 </div>

</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="mongocursor.hasnext.html">MongoCursor::hasNext</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="mongocursor.immortal.html">MongoCursor::immortal</a></div>
 <div class="up"><a href="class.mongocursor.html">MongoCursor</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>