From 92c7c9c951cfcbaa91ac18b2bdb3003017684a12 Mon Sep 17 00:00:00 2001 From: Martin Konecny Date: Thu, 9 May 2013 13:28:26 -0400 Subject: [PATCH] should constants instead of literals - only in function for now... --- airtime_mvc/application/common/Database.php | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/airtime_mvc/application/common/Database.php b/airtime_mvc/application/common/Database.php index bb9557474..b314fea0d 100644 --- a/airtime_mvc/application/common/Database.php +++ b/airtime_mvc/application/common/Database.php @@ -1,6 +1,11 @@ execute()) { - if ($type == 'single') { + if ($type == self::SINGLE) { $rows = $stmt->fetch($fetchType); - } else if ($type == 'column'){ + } else if ($type == self::COLUMN){ $rows = $stmt->fetchColumn(); - } else if ($type == 'all') { + } else if ($type == self::ALL) { $rows = $stmt->fetchAll($fetchType); - } else if ($type == 'execute') { + } else if ($type == self::EXECUTE) { $rows = null; } else { $msg = "bad type passed: type($type)";