This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
phptsmadmin/application/classes/database/tsm/result.php

37 lines
900 B
PHP
Raw Normal View History

2011-03-03 23:06:18 +00:00
<?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 {
2011-06-24 01:27:21 +00:00
public function __construct($result, $sql, $as_object = FALSE, array $params = NULL) {
2011-03-03 23:06:18 +00:00
parent::__construct($result, $sql, $as_object, $params);
2011-04-07 05:03:05 +00:00
$start = FALSE;
2011-03-03 23:06:18 +00:00
foreach ($result as $line) {
if (! trim($line)) {
2011-04-07 05:03:05 +00:00
if ($start)
$this->_internal_row++;
2011-03-03 23:06:18 +00:00
continue;
}
list($k,$v) = explode(':',$line,2);
$this->_rows[$this->_internal_row][trim($k)] = trim($v);
2011-04-07 05:03:05 +00:00
$start = TRUE;
2011-03-03 23:06:18 +00:00
}
$this->_total_rows = $this->_internal_row;
$this->_internal_row = 0;
}
2011-06-24 01:27:21 +00:00
}
2011-03-03 23:06:18 +00:00
?>