37 lines
900 B
PHP
37 lines
900 B
PHP
<?php defined('SYSPATH') or die('No direct access allowed.');
|
|
|
|
/**
|
|
* TSM database result. See [Results](/database/results) for usage and examples.
|
|
*
|
|
* @package PTA
|
|
* @subpackage TSM
|
|
* @category Query/Result
|
|
* @author Deon George
|
|
* @copyright (c) 2010 phpTSMadmin Development Team
|
|
* @license http://phptsmadmin.sf.net/license.html
|
|
*/
|
|
class Database_TSM_Result extends Database_Result {
|
|
public function __construct($result, $sql, $as_object = FALSE, array $params = NULL) {
|
|
parent::__construct($result, $sql, $as_object, $params);
|
|
|
|
$start = FALSE;
|
|
foreach ($result as $line) {
|
|
if (! trim($line)) {
|
|
if ($start)
|
|
$this->_internal_row++;
|
|
|
|
continue;
|
|
}
|
|
|
|
list($k,$v) = explode(':',$line,2);
|
|
|
|
$this->_rows[$this->_internal_row][trim($k)] = trim($v);
|
|
$start = TRUE;
|
|
}
|
|
|
|
$this->_total_rows = $this->_internal_row;
|
|
$this->_internal_row = 0;
|
|
}
|
|
}
|
|
?>
|