public function queryRow($fetchAssociative = true)
{
try {
// Prado::trace('Query Row: '.$this->getDebugStatementText(), 'Prado\Data');
if ($this->_statement instanceof PDOStatement) {
$this->_statement->execute();
} else {
$this->_statement = $this->getConnection()->getPdoInstance()->query($this->getText());
}
$result = $this->_statement->fetch($fetchAssociative ? PDO::FETCH_ASSOC : PDO::FETCH_NUM);
$this->_statement->closeCursor();
return $result;
} catch (Exception $e) {
throw new TDbException('dbcommand_query_failed', $e->getMessage(), $this->getDebugStatementText());
}
}