96 |
* and search/sort |
* and search/sort |
97 |
*/ |
*/ |
98 |
function do_query() { |
function do_query() { |
99 |
|
$count = 0; |
100 |
while ($line = fgets($this->_fp, $this->_maxlinelength)) { |
while ($line = fgets($this->_fp, $this->_maxlinelength)) { |
101 |
if ($this->add_data_row( $this->_construct_row(trim($line)))) { |
if ($this->add_data_row( $this->_construct_row(trim($line)))) { |
102 |
$count++; |
$count++; |
105 |
|
|
106 |
//close the file |
//close the file |
107 |
fclose($this->_fp); |
fclose($this->_fp); |
108 |
$this->set_total_rows( $count ); |
if ($count > 0) { |
109 |
$this->sort(); |
$this->set_total_rows( $count ); |
110 |
|
$this->sort(); |
111 |
|
return true; |
112 |
|
} else { |
113 |
|
return false; |
114 |
|
} |
115 |
} |
} |
116 |
|
|
117 |
/** |
/** |