Exemplo n.º 1
0
 public function insert(FlightBooking $flightBooking)
 {
     $flightBooking->setId(null);
     $flightBooking->setStatus(FlightBooking::PENDING);
     $sql = '
         INSERT INTO flight_bookings (id,first_name, last_name)
             VALUES (:id,:first_name, :last_name)';
     return $this->execute($sql, $flightBooking);
 }
Exemplo n.º 2
0
 public function insert(FlightBooking $flightBooking)
 {
     //needs changing
     //$now = new DateTime();
     $flightBooking->setId(null);
     //$flightBooking->setCreatedOn($now);
     //$flightBooking->setLastModifiedOn($now);
     $flightBooking->setStatus(FlightBooking::PENDING);
     $sql = '
         INSERT INTO flight_bookings (id, first_name, no_of_passengers, status)
             VALUES (:id, :first_name, :no_of_passengers, :status)';
     return $this->execute($sql, $flightBooking);
 }