public function loadQuery($sql, array $args = array(), $dsId = null)
{
if (!$dsId) {
$dsId = $this->readSourceId;
}
$conn = $this->getConnection($dsId);
$stm = $conn->prepare($sql);
$stm->execute($args);
if (false === ($this->_data = $stm->fetch(PDO::FETCH_ASSOC))) {
return $this->reportError('Data load failed.', array('sql' => $sql, 'args' => $args));
}
return $this->reportSuccess('Data loaded', array('id' => isset($this->_data[$pk]) ? $this->_data[$pk] : null, 'sql' => $sql));
}