Added Library Info
This commit is contained in:
@@ -11,12 +11,7 @@
|
||||
* @license http://phptsmadmin.sf.net/license.html
|
||||
*/
|
||||
class Database_TSM_Result extends Database_Result {
|
||||
|
||||
protected $_internal_row = 0;
|
||||
private $_rows;
|
||||
|
||||
public function __construct($result, $sql, $as_object = FALSE, array $params = NULL)
|
||||
{
|
||||
public function __construct($result, $sql, $as_object = FALSE, array $params = NULL) {
|
||||
parent::__construct($result, $sql, $as_object, $params);
|
||||
|
||||
$start = FALSE;
|
||||
@@ -37,60 +32,5 @@ class Database_TSM_Result extends Database_Result {
|
||||
$this->_total_rows = $this->_internal_row;
|
||||
$this->_internal_row = 0;
|
||||
}
|
||||
|
||||
public function __destruct()
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
public function seek($offset)
|
||||
{
|
||||
if ($this->offsetExists($offset))
|
||||
{
|
||||
// Set the current row to the offset
|
||||
$this->_current_row = $this->_internal_row = $offset;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
public function current()
|
||||
{
|
||||
if ($this->_current_row !== $this->_internal_row AND ! $this->seek($this->_current_row))
|
||||
return FALSE;
|
||||
|
||||
if ($this->_as_object === TRUE)
|
||||
{
|
||||
// Return an stdClass
|
||||
return $this;
|
||||
}
|
||||
elseif (is_string($this->_as_object))
|
||||
{
|
||||
// Return an object of given class name
|
||||
$o = new $this->_as_object;
|
||||
|
||||
return $o->load_object($this->_rows[$this->_current_row]);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Return an array of the row
|
||||
return $this->_rows[$this->_current_row];
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a row value from the query
|
||||
*
|
||||
* TSM returns all columns in upper case
|
||||
*/
|
||||
public function get($name, $default = NULL) {
|
||||
$name = strtoupper($name);
|
||||
|
||||
return parent::get($name,$default);
|
||||
}
|
||||
} // End Database_TSM_Result
|
||||
}
|
||||
?>
|
||||
|
Reference in New Issue
Block a user