public function query($str)
{
try {
// $sth = Capsule::getReadPdo()->prepare($str);
// var_dump($sth);exit;
$this->queryStr = $str;
$pdos = Capsule::getReadPdo()->query($str);
$this->debug();
$this->numRows = $pdos->rowCount();
return $pdos->fetchAll(PDO::FETCH_ASSOC);
} catch (PDOException $e) {
$this->error = $e->getMessage();
}
return false;
// // var_dump(Capsule::getReadPdo()->query('show tablesa'));exit;
// return Capsule::select($str);
// $this->initConnect(false);
// if (!$this->_linkID) {
// return false;
// }
// $this->queryStr = $str;
// //释放前次的查询结果
// if ($this->queryID) {
// $this->free();
// }
// $this->Q(1);
// // var_dump($str);exit;
// // var_dump(Capsule::select($str));
// $this->queryID = mysql_query($str, $this->_linkID);
// $this->debug();
// if (false === $this->queryID) {
// $this->error();
// return false;
// } else {
// $this->numRows = mysql_num_rows($this->queryID);
// // var_dump($this->numRows);exit;
// return $this->getAll();
// }
}