diff options
Diffstat (limited to 'core/Tracker/Db.php')
-rw-r--r-- | core/Tracker/Db.php | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/core/Tracker/Db.php b/core/Tracker/Db.php index 01291712d1..331fb3593a 100644 --- a/core/Tracker/Db.php +++ b/core/Tracker/Db.php @@ -155,6 +155,25 @@ abstract class Piwik_Tracker_Db } /** + * This function is a proxy to fetch(), used to maintain compatibility with Zend_Db interface + * @see fetch() + */ + public function fetchOne( $query, $parameters = array() ) + { + $result = $this->fetch($query, $parameters); + return is_array($result) && !empty($result) ? reset($result) : false; + } + + /** + * This function is a proxy to fetch(), used to maintain compatibility with Zend_Db + PDO interface + * @see fetch() + */ + public function exec( $query, $parameters = array() ) + { + return $this->fetch($query, $parameters); + } + + /** * Return number of affected rows in last query * * @param mixed $queryResult Result from query() |