/**
+----------------------------------------------------------
* 获得所有的查询数据
+----------------------------------------------------------
* @access private
+----------------------------------------------------------
* @return array
+----------------------------------------------------------
* @throws ThinkExecption
+----------------------------------------------------------
*/
private function getAll() {
//返回数据集
$result = array();
if($this->numRows >0) {
//$row = mysql_fetch_assoc($this->queryID);
while($row = mysql_fetch_assoc($this->queryID)){
$result[] = $row;
}
mysql_data_seek($this->queryID,0);
}
return $result;
}
zendstudio 提示错误 Connot reduce access level for method ‘getAll';
还有 while($row = mysql_fetch_assoc($this->queryID)) 这个写法是不是可以改的更可读一点。
(意思是, 把数据库源读成二维数组)