コード例 #1
0
 public function loadById($id)
 {
     global $DB;
     $stat = $DB->prepare("SELECT venue_information.* FROM venue_information WHERE id = :id");
     $stat->execute(array('id' => $id));
     if ($stat->rowCount() > 0) {
         $venue = new VenueModel();
         $venue->setFromDataBaseRow($stat->fetch());
         return $venue;
     }
 }
 public function fetchAll()
 {
     $this->buildStart();
     $this->build();
     $this->buildStat();
     $results = array();
     while ($data = $this->stat->fetch()) {
         $venue = new VenueModel();
         $venue->setFromDataBaseRow($data);
         $results[] = $venue;
     }
     return $results;
 }