⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 function.udm-add-search-limit.html

📁 php的帮助文档,涉及到PHP的案例和基本语法,以及实际应用内容
💻 HTML
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head>  <title>Add various search limits</title>  <meta http-equiv="content-type" content="text/html; charset=UTF-8"> </head> <body><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="ref.mnogosearch.html">mnoGoSearch Functions</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.udm-alloc-agent-array.html">udm_alloc_agent_array</a></div> <div class="up"><a href="ref.mnogosearch.html">mnoGoSearch Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div><hr /><div id="function.udm-add-search-limit" class="refentry"> <div class="refnamediv">  <h1 class="refname">udm_add_search_limit</h1>  <p class="verinfo">(PHP 4 &gt;= 4.0.5, PHP 5 &lt;= 5.0.5, PECL mnogosearch:1.0.0)</p><p class="refpurpose"><span class="refname">udm_add_search_limit</span> &mdash; <span class="dc-title">Add various search limits</span></p> </div>  <div class="refsect1 description">  <h3 class="title">Description</h3>  <div class="methodsynopsis dc-description">   <span class="type">bool</span> <span class="methodname"><b><b>udm_add_search_limit</b></b></span>    ( <span class="methodparam"><span class="type">resource</span> <tt class="parameter">$agent</tt></span>   , <span class="methodparam"><span class="type">int</span> <tt class="parameter">$var</tt></span>   , <span class="methodparam"><span class="type">string</span> <tt class="parameter">$val</tt></span>   )</div>  <p class="para rdfs-comment">   <b>udm_add_search_limit()</b> adds search restrictions.  </p> </div> <div class="refsect1 parameters">  <h3 class="title">Parameters</h3>  <p class="para">   <dl>    <dt>     <span class="term"><i><tt class="parameter">agent</tt></i></span>     <dd>      <p class="para">       A link to Agent, received after call to       <a href="function.udm-alloc-agent.html" class="function">udm_alloc_agent()</a>.      </p>     </dd>    </dt>    <dt>     <span class="term"><i><tt class="parameter">var</tt></i></span>     <dd>      <p class="para">       Defines the parameter, indicating limits.        Possible <i><tt class="parameter">var</tt></i> values:       <ul class="itemizedlist">        <li class="listitem">         <span class="simpara">          <b><tt>UDM_LIMIT_URL</tt></b> - defines document URL limitations to limit the search          through subsection of the database. It supports SQL % and _  LIKE wildcards,          where % matches any number of characters, even zero characters,          and _ matches exactly one character. E.g. http://www.example.___/catalog          may stand for http://www.example.com/catalog and http://www.example.net/catalog.         </span>        </li>        <li class="listitem">         <span class="simpara">          <b><tt>UDM_LIMIT_TAG</tt></b> - defines site TAG limitations. In indexer-conf you can          assign specific TAGs to various sites and parts of a site. Tags in          mnoGoSearch 3.1.x are lines, that may contain metasymbols % and _.          Metasymbols allow searching among groups of tags.          E.g. there are links with tags ABCD and ABCE, and search restriction          is by ABC_ - the search will be made among both of the tags.         </span>        </li>        <li class="listitem">         <span class="simpara">          <b><tt>UDM_LIMIT_LANG</tt></b> - defines document language limitations.         </span>        </li>        <li class="listitem">         <span class="simpara">          <b><tt>UDM_LIMIT_CAT</tt></b> - defines document category limitations. Categories are          similar to tag feature, but nested. So you can have one category inside          another and so on. You have to use two characters for each level. Use a          hex number going from 0-F or a 36 base number going from 0-Z.          Therefore a top-level category like &#039;Auto&#039; would be 01. If it has a          subcategory like &#039;Ford&#039;, then it would be 01 (the parent category) and then          &#039;Ford&#039; which we will give 01. Put those together and you get 0101. If &#039;Auto&#039;          had another subcategory named &#039;VW&#039;, then it&#039;s id would be 01 because it          belongs to the &#039;Ford&#039; category and then 02 because it&#039;s the next category.          So it&#039;s id would be 0102. If VW had a sub category called &#039;Engine&#039; then it&#039;s          id would start at 01 again and it would get the &#039;VW&#039; id 02 and &#039;Auto&#039; id of          01, making it 010201. If you want to search for sites under that category          then you pass it cat=010201 in the URL.         </span>        </li>        <li class="listitem">         <p class="para">          <b><tt>UDM_LIMIT_DATE</tt></b> - defines limitation by date the document was modified.         </p>         <p class="para">          Format of parameter value: a string with first character &lt; or &gt;,          then with no space - date in unixtime format, for example:         </p>         <p class="para">          <div class="example">                      <div class="example-contents"><div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />udm_add_search_limit</span><span style="color: #007700">(</span><span style="color: #0000BB">$udm</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">UDM_LIMIT_DATE</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"&amp;lt;908012006"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>           </div>          </div>         </p>         <p class="para">          If &gt; character is used, then the search will be restricted to those          documents having a modification date greater than entered, if &lt;, then smaller.         </p>        </li>       </ul>      </p>     </dd>    </dt>    <dt>     <span class="term"><i><tt class="parameter">val</tt></i></span>     <dd>      <p class="para">       Defines the value of the current parameter.      </p>     </dd>    </dt>   </dl>  </p> </div> <div class="refsect1 returnvalues">  <h3 class="title">Return Values</h3>  <p class="para">   Returns <b><tt>TRUE</tt></b> on success or <b><tt>FALSE</tt></b> on failure.  </p> </div></div><hr /><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="ref.mnogosearch.html">mnoGoSearch Functions</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.udm-alloc-agent-array.html">udm_alloc_agent_array</a></div> <div class="up"><a href="ref.mnogosearch.html">mnoGoSearch Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -