예제 #1
0
 static function get($id)
 {
     $pdo = PDOBuilder::getPDO();
     $stmt = $pdo->prepare("SELECT * FROM DISCOUNTS WHERE ID = :id");
     if ($stmt->execute(array(':id' => $id))) {
         if ($row = $stmt->fetch()) {
             $dis = DiscountsService::buildDBDis($row);
             return $dis;
         }
     }
     return null;
 }