diff --git a/airtime_mvc/application/common/Database.php b/airtime_mvc/application/common/Database.php index 40a8309f1..bf8e44ea3 100644 --- a/airtime_mvc/application/common/Database.php +++ b/airtime_mvc/application/common/Database.php @@ -1,9 +1,8 @@ prepare($sql); foreach ($paramValueMap as $param => $v) { @@ -12,11 +11,11 @@ class Application_Common_Database $rows = array(); if ($stmt->execute()) { if ($type == 'single') { - $rows = $stmt->fetch(PDO::FETCH_ASSOC); - } elseif ($type == 'column'){ + $rows = $stmt->fetch($fetchType); + } else if ($type == 'column'){ $rows = $stmt->fetchColumn(); } else { - $rows = $stmt->fetchAll(PDO::FETCH_ASSOC); + $rows = $stmt->fetchAll($fetchType); } } else { $msg = implode(',', $stmt->errorInfo());