Location: PHPKode > projects > Yellow Duck Framework > doc/api/classYDRecordSet.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>Yellow Duck Framework: YDRecordSet Class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.4.7 -->
<div class="tabs">
  <ul>
    <li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
    <li><a href="namespaces.html"><span>Namespaces</span></a></li>
    <li id="current"><a href="classes.html"><span>Classes</span></a></li>
    <li><a href="files.html"><span>Files</span></a></li>
    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
  </ul></div>
<div class="tabs">
  <ul>
    <li><a href="classes.html"><span>Alphabetical&nbsp;List</span></a></li>
    <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
    <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
    <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
  </ul></div>
<h1>YDRecordSet Class Reference</h1><!-- doxytag: class="YDRecordSet" --><!-- doxytag: inherits="YDBase" -->Inherits <a class="el" href="classYDBase.html">YDBase</a>.
<p>
<a href="classYDRecordSet-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classYDRecordSet.html#bbb6b4a5a40269a16d91e06d57acea26">YDRecordSet</a> ($records, $page=-1, $pagesize=null, $pagevar='page', $sizevar='size', $sortvar='sortfld', $sortdir='sortdir')</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classYDRecordSet.html#bea75373a5577a7627b5de8cb989936b">setTotalRows</a> ($value, $offset=<a class="el" href="YDF2__init_8php.html#1f1d70dc53da2289174e2690032f38b4">false</a>)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classYDRecordSet.html#ec851658b252fd54b7750631f659d5b7">sort</a> ($sortfld, $sortdir='ASC')</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">&amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classYDRecordSet.html#bfb1ae463df73b21da132e4bcdd66c89">getUrl</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classYDRecordSet.html#c6384b56382219f53483b82de87bc8e0">getPreviousUrl</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classYDRecordSet.html#201542500ee128973c85ba86a15d505f">getCurrentUrl</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classYDRecordSet.html#b8453c8f8796dfcb89a73359d6e58786">getNextUrl</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classYDRecordSet.html#d81b5839d1779ded07a279cea52aa351">getPageUrl</a> ($page)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classYDRecordSet.html#8addd13b8b33a277b49bb04caf3c65fd">getSortUrl</a> ($sortfld, $sortdir='ASC')</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classYDRecordSet.html#d007481bdc44f62eb974e9eef36b1f0d">getLastUrl</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classYDRecordSet.html#e847b757bf3c642e4809300c4bd32ce8">getFirstUrl</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classYDRecordSet.html#658defb34762c8f40085aec87e16ba1a">toArray</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classYDRecordSet.html#8f620c0faa56979783c41f5a5e7c9e21">setFields</a> ($fields)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classYDRecordSet.html#ff667c8e7e2da76ea9ba77bc12f20027">getFields</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classYDRecordSet.html#bb2638986efd0a5b7f38ac9f0bfc3617">setCurrentField</a> ($field, $sortdirection)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classYDRecordSet.html#1bcbb478c0ae0a6c0d285651045e11fc">getCurrentField</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classYDRecordSet.html#f8c944f99546f022e7df6dfe00951a25">getSortdirection</a> ($reverse=<a class="el" href="YDF2__init_8php.html#1f1d70dc53da2289174e2690032f38b4">false</a>)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classYDRecordSet.html#9fc748ad784dbb974260ae9f1380cffc">getBrowseBar</a> ($previousLabel='&amp;laquo;', $nextLabel='&amp;raquo;', $style=<a class="el" href="YDDatabase_8php.html#ec73a2bfd6424ec1705d42c19989f703">YD_BROWSEBAR_SHORT</a>, $currentLink=<a class="el" href="YDF2__init_8php.html#1f1d70dc53da2289174e2690032f38b4">false</a>, $allLink=null)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classYDBase.html#f0d84d166fa222e07a0aef085e043209">YDBase</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classYDBase.html#b8f8ee56588ebf5091c288e44ebdfaf4">getClassName</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classYDBase.html#6d24132dc92242f7f71aa98e7ae86442">hasMethod</a> ($name)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classYDBase.html#31021df71fee1ed32512816964394026">isSubClass</a> ($class)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classYDBase.html#7c1cee80f13fa3a3f6a8ec5dc7352d24">getAncestors</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classYDBase.html#4d9813fea8525b19a1d370eeb8fe41d6">serialize</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">&amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classYDBase.html#f94efbb8358b7a2c58b7784a6b99ffd6">set</a> ($name, $value)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classYDBase.html#dd23574959430506d6df014f57adda7b">unsetVar</a> ($name)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classYDBase.html#9adbd1b4410056a869ed791523221464">exists</a> ($name, $null=<a class="el" href="YDF2__init_8php.html#1f1d70dc53da2289174e2690032f38b4">false</a>)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classYDBase.html#f5ea6a083ddb07beb8a30dd32e309ceb">get</a> ($name)</td></tr>

</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
This class implements a (paged) recordset. It contains a lot of extra information about the recordset which is not available if you return the database results as an array. This object is really handy if you want to work with paged recordsets.<p>
Here's the extra information that is available:<p>
<ul>
<li>page: current page number</li><li>pagesize: total size of each page</li><li>pagePrevious: the number of the previous page</li><li>pageNext: the number of the next page</li><li>offset: the first record we started reading from</li><li>totalPages: the total number of pages</li><li>totalRows: the total number of rows in the unpaged recordset</li><li>totalRowsOnPages: the total number of rows on the current page</li><li>isFirstPage: boolean indicating if we are on the first page or not</li><li>isLastPage: boolean indicating if we are on the last page or not</li><li>pages: all the page numbers as a single-dimension array</li><li>getPreviousUrl: the URL to the previous page</li><li>getCurrentUrl: the URL of the current page</li><li>getNextUrl: the URL of the next page</li><li>getPageUrl: the URL of the given page</li></ul>
<p>
All these options are available as class variables.<p>
<dl compact><dt><b><a class="el" href="todo.html#_todo000001">Todo:</a></b></dt><dd>Improve performance with very large recordsets (millions of rows). </dd></dl>

<p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="9adbd1b4410056a869ed791523221464"></a><!-- doxytag: member="YDRecordSet::exists" ref="9adbd1b4410056a869ed791523221464" args="($name, $null=false)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">exists           </td>
          <td>(</td>
          <td class="paramtype">$&nbsp;</td>
          <td class="paramname"> <em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">$&nbsp;</td>
          <td class="paramname"> <em>null</em> = <code><a class="el" href="YDF2__init_8php.html#1f1d70dc53da2289174e2690032f38b4">false</a></code></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"><code> [inherited]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
This function indicates if a variable in the object exists or not.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>$name</em>&nbsp;</td><td>The variable name. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>$null</em>&nbsp;</td><td>(Optional) If false, indicates variables that are null as they don't exist. Default: false.</td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>Returns a boolean indicating if a variable exists or not. </dd></dl>

</div>
</div><p>
<a class="anchor" name="f5ea6a083ddb07beb8a30dd32e309ceb"></a><!-- doxytag: member="YDRecordSet::get" ref="f5ea6a083ddb07beb8a30dd32e309ceb" args="($name)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">get           </td>
          <td>(</td>
          <td class="paramtype">$&nbsp;</td>
          <td class="paramname"> <em>name</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [inherited]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
This function returns a variable value in the object.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>$name</em>&nbsp;</td><td>The variable name.</td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>Returns the variable value. </dd></dl>

<p>
Reimplemented in <a class="el" href="classYDCMComponent.html#cf10f45603972998d30f5896391aca89">YDCMComponent</a>, and <a class="el" href="classYDDatabaseObject.html#e33a9242fba8e092d16dae9bf00f08f8">YDDatabaseObject</a>.
</div>
</div><p>
<a class="anchor" name="7c1cee80f13fa3a3f6a8ec5dc7352d24"></a><!-- doxytag: member="YDRecordSet::getAncestors" ref="7c1cee80f13fa3a3f6a8ec5dc7352d24" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">getAncestors           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [inherited]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Function to get all the ancestors of this class. The list will contain the parent class first, and then it's parent class, etc. You can pass both the name of the class or an object instance to this function.<p>
<dl compact><dt><b>Returns:</b></dt><dd>Array with all the ancestors. </dd></dl>

</div>
</div><p>
<a class="anchor" name="9fc748ad784dbb974260ae9f1380cffc"></a><!-- doxytag: member="YDRecordSet::getBrowseBar" ref="9fc748ad784dbb974260ae9f1380cffc" args="($previousLabel='&amp;laquo;', $nextLabel='&amp;raquo;', $style=YD_BROWSEBAR_SHORT, $currentLink=false, $allLink=null)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">getBrowseBar           </td>
          <td>(</td>
          <td class="paramtype">$&nbsp;</td>
          <td class="paramname"> <em>previousLabel</em> = <code>'&amp;laquo;'</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">$&nbsp;</td>
          <td class="paramname"> <em>nextLabel</em> = <code>'&amp;raquo;'</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">$&nbsp;</td>
          <td class="paramname"> <em>style</em> = <code><a class="el" href="YDDatabase_8php.html#ec73a2bfd6424ec1705d42c19989f703">YD_BROWSEBAR_SHORT</a></code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">$&nbsp;</td>
          <td class="paramname"> <em>currentLink</em> = <code><a class="el" href="YDF2__init_8php.html#1f1d70dc53da2289174e2690032f38b4">false</a></code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">$&nbsp;</td>
          <td class="paramname"> <em>allLink</em> = <code>null</code></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
This function gives a prerendered browsing bar for the recordset.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>$previousLabel</em>&nbsp;</td><td>(optional) Label for the previous link. Defaults to "&amp;laquo;". </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>$nextLabel</em>&nbsp;</td><td>(optional) Label for the next link. Defaults to "&amp;raquo;". </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>$style</em>&nbsp;</td><td>(optional) Style of the browse bar. This can be either YD_BROWSEBAR_FULL or YD_BROWSEBAR_FULL. The full one shows all page numbers, the short one doesn't. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>$currentLink</em>&nbsp;</td><td>(optional) Boolean indicating if you should be able to click on the link for the current page or not.</td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>The browsebar as formatted HTML. </dd></dl>

</div>
</div><p>
<a class="anchor" name="b8f8ee56588ebf5091c288e44ebdfaf4"></a><!-- doxytag: member="YDRecordSet::getClassName" ref="b8f8ee56588ebf5091c288e44ebdfaf4" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">getClassName           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [inherited]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
This function returns the name of the current class.<p>
<dl compact><dt><b>Returns:</b></dt><dd>The name of the current class in lowercase. </dd></dl>

</div>
</div><p>
<a class="anchor" name="1bcbb478c0ae0a6c0d285651045e11fc"></a><!-- doxytag: member="YDRecordSet::getCurrentField" ref="1bcbb478c0ae0a6c0d285651045e11fc" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">getCurrentField           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Get current field name 
</div>
</div><p>
<a class="anchor" name="201542500ee128973c85ba86a15d505f"></a><!-- doxytag: member="YDRecordSet::getCurrentUrl" ref="201542500ee128973c85ba86a15d505f" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">getCurrentUrl           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
This returns the URL to the current page.<p>
<dl compact><dt><b>Returns:</b></dt><dd>The URL to the current page. </dd></dl>

</div>
</div><p>
<a class="anchor" name="ff667c8e7e2da76ea9ba77bc12f20027"></a><!-- doxytag: member="YDRecordSet::getFields" ref="ff667c8e7e2da76ea9ba77bc12f20027" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">getFields           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Gets fields names 
</div>
</div><p>
<a class="anchor" name="e847b757bf3c642e4809300c4bd32ce8"></a><!-- doxytag: member="YDRecordSet::getFirstUrl" ref="e847b757bf3c642e4809300c4bd32ce8" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">getFirstUrl           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
This function returns the url of the first page in the set.<p>
<dl compact><dt><b>Returns:</b></dt><dd>The url of the last first in the set. </dd></dl>

</div>
</div><p>
<a class="anchor" name="d007481bdc44f62eb974e9eef36b1f0d"></a><!-- doxytag: member="YDRecordSet::getLastUrl" ref="d007481bdc44f62eb974e9eef36b1f0d" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">getLastUrl           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
This function returns the url of the last page in the set.<p>
<dl compact><dt><b>Returns:</b></dt><dd>The url of the last page in the set. </dd></dl>

</div>
</div><p>
<a class="anchor" name="b8453c8f8796dfcb89a73359d6e58786"></a><!-- doxytag: member="YDRecordSet::getNextUrl" ref="b8453c8f8796dfcb89a73359d6e58786" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">getNextUrl           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
This returns the URL to the next page. If there is no next page, it will return false.<p>
<dl compact><dt><b>Returns:</b></dt><dd>The URL to the next page or false if no next page. </dd></dl>

</div>
</div><p>
<a class="anchor" name="d81b5839d1779ded07a279cea52aa351"></a><!-- doxytag: member="YDRecordSet::getPageUrl" ref="d81b5839d1779ded07a279cea52aa351" args="($page)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">getPageUrl           </td>
          <td>(</td>
          <td class="paramtype">$&nbsp;</td>
          <td class="paramname"> <em>page</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
This function will update the query string to set the page size and page number.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>$page</em>&nbsp;</td><td>The page number.</td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>The updated URL. </dd></dl>

</div>
</div><p>
<a class="anchor" name="c6384b56382219f53483b82de87bc8e0"></a><!-- doxytag: member="YDRecordSet::getPreviousUrl" ref="c6384b56382219f53483b82de87bc8e0" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">getPreviousUrl           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
This returns the URL to the previous page. If there is no previous page, it will return false.<p>
<dl compact><dt><b>Returns:</b></dt><dd>The URL to the previous page or false if no previous page. </dd></dl>

</div>
</div><p>
<a class="anchor" name="f8c944f99546f022e7df6dfe00951a25"></a><!-- doxytag: member="YDRecordSet::getSortdirection" ref="f8c944f99546f022e7df6dfe00951a25" args="($reverse=false)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">getSortdirection           </td>
          <td>(</td>
          <td class="paramtype">$&nbsp;</td>
          <td class="paramname"> <em>reverse</em> = <code><a class="el" href="YDF2__init_8php.html#1f1d70dc53da2289174e2690032f38b4">false</a></code>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Get sort direction<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>$reverse</em>&nbsp;</td><td>(optional) Boolean if we want a reverse direction </td></tr>
  </table>
</dl>

</div>
</div><p>
<a class="anchor" name="8addd13b8b33a277b49bb04caf3c65fd"></a><!-- doxytag: member="YDRecordSet::getSortUrl" ref="8addd13b8b33a277b49bb04caf3c65fd" args="($sortfld, $sortdir='ASC')" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">getSortUrl           </td>
          <td>(</td>
          <td class="paramtype">$&nbsp;</td>
          <td class="paramname"> <em>sortfld</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">$&nbsp;</td>
          <td class="paramname"> <em>sortdir</em> = <code>'ASC'</code></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
This function will return an URL to sort on a field.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>$sortfld</em>&nbsp;</td><td>The field to sort on. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>$sortdir</em>&nbsp;</td><td>(optional) The sort direction. Default is ASC. </td></tr>
  </table>
</dl>

</div>
</div><p>
<a class="anchor" name="bfb1ae463df73b21da132e4bcdd66c89"></a><!-- doxytag: member="YDRecordSet::getUrl" ref="bfb1ae463df73b21da132e4bcdd66c89" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">&amp; getUrl           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
This function returns a reference to the URL for this recordset object. If you want to alter this url, you should get a instance of it as a reference. This code shows you how to do this:<p>
<div class="fragment"><pre class="fragment">  $url = &amp; $dataset-&gt;getUrl();
</pre></div><p>
<dl compact><dt><b>Returns:</b></dt><dd>Reference to the <a class="el" href="classYDUrl.html">YDUrl</a> object for this <a class="el" href="classYDRecordSet.html">YDRecordSet</a> object. </dd></dl>

</div>
</div><p>
<a class="anchor" name="6d24132dc92242f7f71aa98e7ae86442"></a><!-- doxytag: member="YDRecordSet::hasMethod" ref="6d24132dc92242f7f71aa98e7ae86442" args="($name)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">hasMethod           </td>
          <td>(</td>
          <td class="paramtype">$&nbsp;</td>
          <td class="paramname"> <em>name</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [inherited]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
This function returns true if the specified method is existing in the current class.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>$name</em>&nbsp;</td><td>The name of the class method to look for.</td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>Boolean indicating if the class method exists or not. </dd></dl>

</div>
</div><p>
<a class="anchor" name="31021df71fee1ed32512816964394026"></a><!-- doxytag: member="YDRecordSet::isSubClass" ref="31021df71fee1ed32512816964394026" args="($class)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">isSubClass           </td>
          <td>(</td>
          <td class="paramtype">$&nbsp;</td>
          <td class="paramname"> <em>class</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [inherited]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
This function checks if this object instance is of a specific class or is based on a derived class of the given class. The class name is case insensitive.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>$class</em>&nbsp;</td><td>The object type you want to check against.</td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>Boolean indicating if this object is of the specified class. </dd></dl>

</div>
</div><p>
<a class="anchor" name="4d9813fea8525b19a1d370eeb8fe41d6"></a><!-- doxytag: member="YDRecordSet::serialize" ref="4d9813fea8525b19a1d370eeb8fe41d6" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">serialize           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [inherited]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
This function will serialize the object. 
</div>
</div><p>
<a class="anchor" name="f94efbb8358b7a2c58b7784a6b99ffd6"></a><!-- doxytag: member="YDRecordSet::set" ref="f94efbb8358b7a2c58b7784a6b99ffd6" args="($name, $value)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">&amp; set           </td>
          <td>(</td>
          <td class="paramtype">$&nbsp;</td>
          <td class="paramname"> <em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">$&nbsp;</td>
          <td class="paramname"> <em>value</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"><code> [inherited]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
This function sets a variable in the object.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>$name</em>&nbsp;</td><td>The variable name. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>$value</em>&nbsp;</td><td>The variable value.</td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>Returns a reference to the variable </dd></dl>

<p>
Reimplemented in <a class="el" href="classYDDatabaseObject.html#079bbf10793abd07e272d0505b7e2a38">YDDatabaseObject</a>.
</div>
</div><p>
<a class="anchor" name="bb2638986efd0a5b7f38ac9f0bfc3617"></a><!-- doxytag: member="YDRecordSet::setCurrentField" ref="bb2638986efd0a5b7f38ac9f0bfc3617" args="($field, $sortdirection)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">setCurrentField           </td>
          <td>(</td>
          <td class="paramtype">$&nbsp;</td>
          <td class="paramname"> <em>field</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">$&nbsp;</td>
          <td class="paramname"> <em>sortdirection</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Set current field name<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>$field</em>&nbsp;</td><td>Field name of sort </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>$sortdirection</em>&nbsp;</td><td>Sort direction </td></tr>
  </table>
</dl>

</div>
</div><p>
<a class="anchor" name="8f620c0faa56979783c41f5a5e7c9e21"></a><!-- doxytag: member="YDRecordSet::setFields" ref="8f620c0faa56979783c41f5a5e7c9e21" args="($fields)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">setFields           </td>
          <td>(</td>
          <td class="paramtype">$&nbsp;</td>
          <td class="paramname"> <em>fields</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Sets fields names<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>$fields</em>&nbsp;</td><td>Field name of sort </td></tr>
  </table>
</dl>

</div>
</div><p>
<a class="anchor" name="bea75373a5577a7627b5de8cb989936b"></a><!-- doxytag: member="YDRecordSet::setTotalRows" ref="bea75373a5577a7627b5de8cb989936b" args="($value, $offset=false)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">setTotalRows           </td>
          <td>(</td>
          <td class="paramtype">$&nbsp;</td>
          <td class="paramname"> <em>value</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">$&nbsp;</td>
          <td class="paramname"> <em>offset</em> = <code><a class="el" href="YDF2__init_8php.html#1f1d70dc53da2289174e2690032f38b4">false</a></code></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
This function replaces the total number of rows with a defined value.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>$value</em>&nbsp;</td><td>The total number of rows. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>$offset</em>&nbsp;</td><td>(optional) If true, the current set will be a slice of the records based on the page size and the current page. Otherwise, the offset value will be zero and the "pagesize" number of rows will be used. Default: false. </td></tr>
  </table>
</dl>

</div>
</div><p>
<a class="anchor" name="ec851658b252fd54b7750631f659d5b7"></a><!-- doxytag: member="YDRecordSet::sort" ref="ec851658b252fd54b7750631f659d5b7" args="($sortfld, $sortdir='ASC')" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">sort           </td>
          <td>(</td>
          <td class="paramtype">$&nbsp;</td>
          <td class="paramname"> <em>sortfld</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">$&nbsp;</td>
          <td class="paramname"> <em>sortdir</em> = <code>'ASC'</code></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
This function will sort the data given the name of the field to sort on and the sort direction.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>$sortfld</em>&nbsp;</td><td>The field to sort on. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>$sortdir</em>&nbsp;</td><td>(optional) The sort direction. The default is ASC. </td></tr>
  </table>
</dl>

</div>
</div><p>
<a class="anchor" name="658defb34762c8f40085aec87e16ba1a"></a><!-- doxytag: member="YDRecordSet::toArray" ref="658defb34762c8f40085aec87e16ba1a" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">toArray           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Converts the <a class="el" href="classYDDatabase.html">YDDatabase</a> set to an array containing the records of the recordset. The meta information about the dataset is not kept. 
<p>
Reimplemented from <a class="el" href="classYDBase.html#658defb34762c8f40085aec87e16ba1a">YDBase</a>.
</div>
</div><p>
<a class="anchor" name="dd23574959430506d6df014f57adda7b"></a><!-- doxytag: member="YDRecordSet::unsetVar" ref="dd23574959430506d6df014f57adda7b" args="($name)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">unsetVar           </td>
          <td>(</td>
          <td class="paramtype">$&nbsp;</td>
          <td class="paramname"> <em>name</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [inherited]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
This function deletes a variable in the object.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>$name</em>&nbsp;</td><td>The variable name. </td></tr>
  </table>
</dl>

</div>
</div><p>
<a class="anchor" name="f0d84d166fa222e07a0aef085e043209"></a><!-- doxytag: member="YDRecordSet::YDBase" ref="f0d84d166fa222e07a0aef085e043209" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classYDBase.html">YDBase</a>           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [inherited]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Class constructor for the <a class="el" href="classYDBase.html">YDBase</a> class. 
</div>
</div><p>
<a class="anchor" name="bbb6b4a5a40269a16d91e06d57acea26"></a><!-- doxytag: member="YDRecordSet::YDRecordSet" ref="bbb6b4a5a40269a16d91e06d57acea26" args="($records, $page=-1, $pagesize=null, $pagevar='page', $sizevar='size', $sortvar='sortfld', $sortdir='sortdir')" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classYDRecordSet.html">YDRecordSet</a>           </td>
          <td>(</td>
          <td class="paramtype">$&nbsp;</td>
          <td class="paramname"> <em>records</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">$&nbsp;</td>
          <td class="paramname"> <em>page</em> = <code>-1</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">$&nbsp;</td>
          <td class="paramname"> <em>pagesize</em> = <code>null</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">$&nbsp;</td>
          <td class="paramname"> <em>pagevar</em> = <code>'page'</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">$&nbsp;</td>
          <td class="paramname"> <em>sizevar</em> = <code>'size'</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">$&nbsp;</td>
          <td class="paramname"> <em>sortvar</em> = <code>'sortfld'</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">$&nbsp;</td>
          <td class="paramname"> <em>sortdir</em> = <code>'sortdir'</code></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
This is the class constructor for the <a class="el" href="classYDRecordSet.html">YDRecordSet</a> class.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>$records</em>&nbsp;</td><td>The list of records as an array (as returned by the <a class="el" href="classYDDatabaseDriver.html#57ee05cc433dc07677dbe12e48e56823">YDDatabaseDriver::getRecords</a> function. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>$page</em>&nbsp;</td><td>(optional) The page you want to retrieve. If omitted all records will be returned. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>$pagesize</em>&nbsp;</td><td>(optional) The maximum number of rows for each page. If a page number is given, the default will be to return a maximum of 20 rows. If no page number is given, the pagesize will be the same as the total number of rows in the recordset. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>$pagevar</em>&nbsp;</td><td>(optional) The name of the query string variable indicating the page. Defaults to "page" </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>$sizevar</em>&nbsp;</td><td>(optional) The name of the query string variable indicating the page size. Defaults to "size" </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>$sortvar</em>&nbsp;</td><td>(optional) The name of the query string variable indicating the sort feild. Defaults to "sortfld" </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>$sortdir</em>&nbsp;</td><td>(optional) The name of the query string variable indicating the direction. Defaults to "sortdir" </td></tr>
  </table>
</dl>

</div>
</div><p>
<hr>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="YDDatabase_8php.html">YDDatabase.php</a></ul>
<p>
<hr size="1" noshade>
<address>
    <small>
        Yellow Duck Framework 2.0 by Pieter Claerhout,
        <a href="ydframework.berlios.de">ydframework.berlios.de</a>
    </small>
</address>
</p>

</body>

</html>
Return current item: Yellow Duck Framework