simple-oai-pmh/doc/classDB__Result.html

435 lines
18 KiB
HTML
Raw Normal View History

<!-- This comment will put IE 6, 7 and 8 in quirks mode -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Data Centre: DB_Result Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javaScript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.6.3 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li>
<div id="MSearchBox" class="MSearchBoxInactive">
<img id="MSearchSelect" src="search/search.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</div>
</li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
<li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
</ul>
</div>
</div>
<div class="contents">
<h1>DB_Result Class Reference</h1><!-- doxytag: class="DB_Result" -->
<p><a href="classDB__Result-members.html">List of all members.</a></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDB__Result.html#a3125475f7b50d5931a833fd327c34811">result</a> ($type= 'object')</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDB__Result.html#a824851b08633b98994c3518227ab302b">result_object</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDB__Result.html#af9256bb99653d3bbf555f8d1ec484b46">result_array</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDB__Result.html#a59e797f05317a20dc9e3152b6c7b89b7">row</a> ($n=0, $type= 'object')</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDB__Result.html#addb85fd92d5f675a64fbcda365aa99f8">set_row</a> ($key, $value=NULL)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDB__Result.html#ab77151c1babf00fd4041d1c4dbb3f372">row_object</a> ($n=0)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDB__Result.html#ace21d4de4484f925fcf562c53a381cc4">row_array</a> ($n=0)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDB__Result.html#a82902cae4792a6e7c55a592fb9e4bec0">first_row</a> ($type= 'object')</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDB__Result.html#a2f7962426a01bc6d275898c87ec83cdf">last_row</a> ($type= 'object')</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDB__Result.html#a569cea7fce3ad152fdb1932ba0a4a417">next_row</a> ($type= 'object')</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDB__Result.html#a10264acc63296561586d3f94513feb30">previous_row</a> ($type= 'object')</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDB__Result.html#abc9f874010b1c067578f0416308c16ac">list_fields</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDB__Result.html#aa0233102d0982979b398b98b00e59ba4">free_result</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDB__Result.html#a2c815e2ad68609c9f903c10fa621cd40">reset_result</a> ($r_id)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDB__Result.html#a3b5f794ccd6e32f7e03e13294ff6c7cf">_data_seek</a> ($n=0)</td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>Database Result Class</p>
<p>This is a wrapper of normal result operations for PostgreSQL. Two types of results are dealt here: object and array </p>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a3125475f7b50d5931a833fd327c34811"></a><!-- doxytag: member="DB_Result::result" ref="a3125475f7b50d5931a833fd327c34811" args="($type= 'object')" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">DB_Result::result </td>
<td>(</td>
<td class="paramtype">$&nbsp;</td>
<td class="paramname"> <em>type</em> = <code>'object'</code></td>
<td>&nbsp;)&nbsp;</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Query result. Acts as a wrapper function for the following functions.</p>
<p>public </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>string</em>&nbsp;</td><td>can be "object" or "array" </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>mixed either a result object or array </dd></dl>
</div>
</div>
<a class="anchor" id="a824851b08633b98994c3518227ab302b"></a><!-- doxytag: member="DB_Result::result_object" ref="a824851b08633b98994c3518227ab302b" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">DB_Result::result_object </td>
<td>(</td>
<td class="paramname"></td>
<td>&nbsp;)&nbsp;</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Query result. "object" version.</p>
<p>public </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>object </dd></dl>
</div>
</div>
<a class="anchor" id="af9256bb99653d3bbf555f8d1ec484b46"></a><!-- doxytag: member="DB_Result::result_array" ref="af9256bb99653d3bbf555f8d1ec484b46" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">DB_Result::result_array </td>
<td>(</td>
<td class="paramname"></td>
<td>&nbsp;)&nbsp;</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Query result. "array" version.</p>
<p>public </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>array </dd></dl>
</div>
</div>
<a class="anchor" id="a59e797f05317a20dc9e3152b6c7b89b7"></a><!-- doxytag: member="DB_Result::row" ref="a59e797f05317a20dc9e3152b6c7b89b7" args="($n=0, $type= 'object')" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">DB_Result::row </td>
<td>(</td>
<td class="paramtype">$&nbsp;</td>
<td class="paramname"> <em>n</em> = <code>0</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">$&nbsp;</td>
<td class="paramname"> <em>type</em> = <code>'object'</code></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Query result. Acts as a wrapper function for the following functions.</p>
<p>public </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>string</em>&nbsp;</td><td></td></tr>
<tr><td valign="top"></td><td valign="top"><em>string</em>&nbsp;</td><td>can be "object" or "array" </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>mixed either a result object or array </dd></dl>
</div>
</div>
<a class="anchor" id="addb85fd92d5f675a64fbcda365aa99f8"></a><!-- doxytag: member="DB_Result::set_row" ref="addb85fd92d5f675a64fbcda365aa99f8" args="($key, $value=NULL)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">DB_Result::set_row </td>
<td>(</td>
<td class="paramtype">$&nbsp;</td>
<td class="paramname"> <em>key</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">$&nbsp;</td>
<td class="paramname"> <em>value</em> = <code>NULL</code></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Assigns an item into a particular column slot</p>
<p>public </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>object </dd></dl>
</div>
</div>
<a class="anchor" id="ab77151c1babf00fd4041d1c4dbb3f372"></a><!-- doxytag: member="DB_Result::row_object" ref="ab77151c1babf00fd4041d1c4dbb3f372" args="($n=0)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">DB_Result::row_object </td>
<td>(</td>
<td class="paramtype">$&nbsp;</td>
<td class="paramname"> <em>n</em> = <code>0</code></td>
<td>&nbsp;)&nbsp;</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Returns a single result row - object version</p>
<p>public </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>object </dd></dl>
</div>
</div>
<a class="anchor" id="ace21d4de4484f925fcf562c53a381cc4"></a><!-- doxytag: member="DB_Result::row_array" ref="ace21d4de4484f925fcf562c53a381cc4" args="($n=0)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">DB_Result::row_array </td>
<td>(</td>
<td class="paramtype">$&nbsp;</td>
<td class="paramname"> <em>n</em> = <code>0</code></td>
<td>&nbsp;)&nbsp;</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Returns a single result row - array version</p>
<p>public </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>array </dd></dl>
</div>
</div>
<a class="anchor" id="a82902cae4792a6e7c55a592fb9e4bec0"></a><!-- doxytag: member="DB_Result::first_row" ref="a82902cae4792a6e7c55a592fb9e4bec0" args="($type= 'object')" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">DB_Result::first_row </td>
<td>(</td>
<td class="paramtype">$&nbsp;</td>
<td class="paramname"> <em>type</em> = <code>'object'</code></td>
<td>&nbsp;)&nbsp;</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Returns the "first" row</p>
<p>public </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>object </dd></dl>
</div>
</div>
<a class="anchor" id="a2f7962426a01bc6d275898c87ec83cdf"></a><!-- doxytag: member="DB_Result::last_row" ref="a2f7962426a01bc6d275898c87ec83cdf" args="($type= 'object')" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">DB_Result::last_row </td>
<td>(</td>
<td class="paramtype">$&nbsp;</td>
<td class="paramname"> <em>type</em> = <code>'object'</code></td>
<td>&nbsp;)&nbsp;</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Returns the "last" row</p>
<p>public </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>object </dd></dl>
</div>
</div>
<a class="anchor" id="a569cea7fce3ad152fdb1932ba0a4a417"></a><!-- doxytag: member="DB_Result::next_row" ref="a569cea7fce3ad152fdb1932ba0a4a417" args="($type= 'object')" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">DB_Result::next_row </td>
<td>(</td>
<td class="paramtype">$&nbsp;</td>
<td class="paramname"> <em>type</em> = <code>'object'</code></td>
<td>&nbsp;)&nbsp;</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Returns the "next" row</p>
<p>public </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>object </dd></dl>
</div>
</div>
<a class="anchor" id="a10264acc63296561586d3f94513feb30"></a><!-- doxytag: member="DB_Result::previous_row" ref="a10264acc63296561586d3f94513feb30" args="($type= 'object')" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">DB_Result::previous_row </td>
<td>(</td>
<td class="paramtype">$&nbsp;</td>
<td class="paramname"> <em>type</em> = <code>'object'</code></td>
<td>&nbsp;)&nbsp;</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Returns the "previous" row</p>
<p>public </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>object </dd></dl>
</div>
</div>
<a class="anchor" id="abc9f874010b1c067578f0416308c16ac"></a><!-- doxytag: member="DB_Result::list_fields" ref="abc9f874010b1c067578f0416308c16ac" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">DB_Result::list_fields </td>
<td>(</td>
<td class="paramname"></td>
<td>&nbsp;)&nbsp;</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Fetch Field Names</p>
<p>Generates an array of column names</p>
<p>public </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>array </dd></dl>
</div>
</div>
<a class="anchor" id="aa0233102d0982979b398b98b00e59ba4"></a><!-- doxytag: member="DB_Result::free_result" ref="aa0233102d0982979b398b98b00e59ba4" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">DB_Result::free_result </td>
<td>(</td>
<td class="paramname"></td>
<td>&nbsp;)&nbsp;</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Free the result</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>void </dd></dl>
</div>
</div>
<a class="anchor" id="a2c815e2ad68609c9f903c10fa621cd40"></a><!-- doxytag: member="DB_Result::reset_result" ref="a2c815e2ad68609c9f903c10fa621cd40" args="($r_id)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">DB_Result::reset_result </td>
<td>(</td>
<td class="paramtype">$&nbsp;</td>
<td class="paramname"> <em>r_id</em></td>
<td>&nbsp;)&nbsp;</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Reset current <a class="el" href="classDB__Result.html">DB_Result</a> object</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>void </dd></dl>
</div>
</div>
<a class="anchor" id="a3b5f794ccd6e32f7e03e13294ff6c7cf"></a><!-- doxytag: member="DB_Result::_data_seek" ref="a3b5f794ccd6e32f7e03e13294ff6c7cf" args="($n=0)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">DB_Result::_data_seek </td>
<td>(</td>
<td class="paramtype">$&nbsp;</td>
<td class="paramname"> <em>n</em> = <code>0</code></td>
<td>&nbsp;)&nbsp;</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Data Seek</p>
<p>Moves the internal pointer to the desired offset. We call this internally before fetching results to make sure the result set starts at zero</p>
<p>private </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>array </dd></dl>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>DB_Result.php</li>
</ul>
</div>
<!--- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&nbsp;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&nbsp;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&nbsp;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&nbsp;</span>Functions</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<hr class="footer"/><address style="text-align: right;"><small>Generated on Fri May 27 09:42:03 2011 for Data Centre by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
</body>
</html>