<!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>Get the hint string of the query</title> </head> <body><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="tokyotyrantquery.current.html">TokyoTyrantQuery::current</a></div> <div class="next" style="text-align: right; float: right;"><a href="tokyotyrantquery.key.html">TokyoTyrantQuery::key</a></div> <div class="up"><a href="class.tokyotyrantquery.html">TokyoTyrantQuery</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div><hr /><div id="tokyotyrantquery.hint" class="refentry"> <div class="refnamediv"> <h1 class="refname">TokyoTyrantQuery::hint</h1> <p class="verinfo">(No version information available, might only be in SVN)</p><p class="refpurpose"><span class="refname">TokyoTyrantQuery::hint</span> — <span class="dc-title">Get the hint string of the query</span></p> </div> <div class="refsect1 description" id="refsect1-tokyotyrantquery.hint-description"> <h3 class="title">Description</h3> <div class="methodsynopsis dc-description"> <span class="modifier">public</span> <span class="type">string</span> <span class="methodname"><strong>TokyoTyrantQuery::hint</strong></span> ( <span class="methodparam">void</span> )</div> <p class="para rdfs-comment"> Get the hint string of the query. The hint string contains information about an executed query and it could be compared to for example MySQL EXPLAIN statement. </p> </div> <div class="refsect1 parameters" id="refsect1-tokyotyrantquery.hint-parameters"> <h3 class="title">Parameters</h3> <p class="para">This function has no parameters.</p> </div> <div class="refsect1 returnvalues" id="refsect1-tokyotyrantquery.hint-returnvalues"> <h3 class="title">Return Values</h3> <p class="para"> This method always returns a string </p> </div> <div class="refsect1 examples" id="refsect1-tokyotyrantquery.hint-examples"> <h3 class="title">Examples</h3> <p class="para"> <div class="example" id="example-2234"> <p><strong>Example #1 TokyoTyrantQuery::hint example</strong></p> <div class="example-contents"> <div class="phpcode"><code><span style="color: #000000"> <span style="color: #0000BB"><?php<br />$tt </span><span style="color: #007700">= new </span><span style="color: #0000BB">TokyoTyrantTable</span><span style="color: #007700">(</span><span style="color: #DD0000">"localhost"</span><span style="color: #007700">, </span><span style="color: #0000BB">1979</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$tt</span><span style="color: #007700">-></span><span style="color: #0000BB">vanish</span><span style="color: #007700">();<br /><br />for (</span><span style="color: #0000BB">$i </span><span style="color: #007700">= </span><span style="color: #0000BB">0</span><span style="color: #007700">; </span><span style="color: #0000BB">$i </span><span style="color: #007700">< </span><span style="color: #0000BB">11</span><span style="color: #007700">; </span><span style="color: #0000BB">$i</span><span style="color: #007700">++) {<br /> </span><span style="color: #0000BB">$tt</span><span style="color: #007700">-></span><span style="color: #0000BB">put</span><span style="color: #007700">(</span><span style="color: #0000BB">null</span><span style="color: #007700">, array(</span><span style="color: #DD0000">'a_col' </span><span style="color: #007700">=> </span><span style="color: #DD0000">'a' </span><span style="color: #007700">. </span><span style="color: #0000BB">$i</span><span style="color: #007700">, </span><span style="color: #DD0000">'b_col' </span><span style="color: #007700">=> </span><span style="color: #DD0000">'b' </span><span style="color: #007700">. </span><span style="color: #0000BB">$i</span><span style="color: #007700">));<br />}<br /><br /></span><span style="color: #0000BB">$query </span><span style="color: #007700">= </span><span style="color: #0000BB">$tt</span><span style="color: #007700">-></span><span style="color: #0000BB">getQuery</span><span style="color: #007700">();<br /></span><span style="color: #0000BB">$query</span><span style="color: #007700">-></span><span style="color: #0000BB">addCond</span><span style="color: #007700">(</span><span style="color: #DD0000">'a_col'</span><span style="color: #007700">, </span><span style="color: #0000BB">TokyoTyrant</span><span style="color: #007700">::</span><span style="color: #0000BB">RDBQC_STRBW</span><span style="color: #007700">, </span><span style="color: #DD0000">'a'</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">$query</span><span style="color: #007700">-></span><span style="color: #0000BB">search</span><span style="color: #007700">();<br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">$query</span><span style="color: #007700">-></span><span style="color: #0000BB">hint</span><span style="color: #007700">());<br /></span><span style="color: #0000BB">?></span> </span> </code></div> </div> <div class="example-contents"><p>The above example will output something similar to:</p></div> <div class="example-contents screen"> <div class="cdata"><pre> string(72) " scanning the whole table result set size: 11 leaving the natural order " </pre></div> </div> </div> </p> </div> <div class="refsect1 seealso" id="refsect1-tokyotyrantquery.hint-seealso"> <h3 class="title">See Also</h3> <p class="para"> <ul class="simplelist"> <li class="member"> <span class="methodname"><a href="tokyotyrantquery.addcond.html" class="methodname" rel="rdfs-seeAlso">TokyoTyrantQuery::addCond()</a> - Adds a condition to the query</span></li> </ul> </p> </div> </div><hr /><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="tokyotyrantquery.current.html">TokyoTyrantQuery::current</a></div> <div class="next" style="text-align: right; float: right;"><a href="tokyotyrantquery.key.html">TokyoTyrantQuery::key</a></div> <div class="up"><a href="class.tokyotyrantquery.html">TokyoTyrantQuery</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div></body></html>