update
This commit is contained in:
parent
1f6cd81724
commit
a71a7b0df8
@ -60,6 +60,7 @@
|
|||||||
return $hall;
|
return $hall;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Search a hall
|
||||||
public function searchHall($number, $cinema){
|
public function searchHall($number, $cinema){
|
||||||
|
|
||||||
$sql = sprintf( "SELECT * FROM hall WHERE
|
$sql = sprintf( "SELECT * FROM hall WHERE
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
//Methods:
|
//Methods:
|
||||||
|
|
||||||
//Create a new Hall.
|
//Create a new Seat.
|
||||||
public function createSeat($hall, $cinema, $row, $col, $state){
|
public function createSeat($hall, $cinema, $row, $col, $state){
|
||||||
|
|
||||||
$sql = sprintf( "INSERT INTO `seat`( `idhall`, `idcinema`, `numrow`, `numcolum`, `active`)
|
$sql = sprintf( "INSERT INTO `seat`( `idhall`, `idcinema`, `numrow`, `numcolum`, `active`)
|
||||||
@ -22,6 +22,7 @@
|
|||||||
return $sql;
|
return $sql;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//search all Seat
|
||||||
public function getAllSeats($number, $cinema){
|
public function getAllSeats($number, $cinema){
|
||||||
|
|
||||||
$sql = sprintf( "SELECT * FROM seat WHERE
|
$sql = sprintf( "SELECT * FROM seat WHERE
|
||||||
@ -38,7 +39,7 @@
|
|||||||
|
|
||||||
return $seat_map;
|
return $seat_map;
|
||||||
}
|
}
|
||||||
|
//Delete a Seat
|
||||||
public function deletemapSeats($hall, $cinema){
|
public function deletemapSeats($hall, $cinema){
|
||||||
$sql = sprintf( "DELETE FROM `seat` WHERE
|
$sql = sprintf( "DELETE FROM `seat` WHERE
|
||||||
idcinema = '%s' AND idhall = '%s'",
|
idcinema = '%s' AND idhall = '%s'",
|
||||||
@ -49,6 +50,7 @@
|
|||||||
return $resul;
|
return $resul;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Create a new Seat Data Transfer Object.
|
||||||
public function loadSeat($idhall, $idcinema, $numRow, $numCol, $state){
|
public function loadSeat($idhall, $idcinema, $numRow, $numCol, $state){
|
||||||
return new Seat($idhall, $idcinema, $numRow, $numCol, $state);
|
return new Seat($idhall, $idcinema, $numRow, $numCol, $state);
|
||||||
}
|
}
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
}
|
}
|
||||||
//Methods:
|
//Methods:
|
||||||
|
|
||||||
|
//Create a new Session
|
||||||
public function createSession($id, $idfilm, $idhall, $idcinema, $date, $startTime, $seatPrice, $format){
|
public function createSession($id, $idfilm, $idhall, $idcinema, $date, $startTime, $seatPrice, $format){
|
||||||
$format = $this->mysqli->real_escape_string($format);
|
$format = $this->mysqli->real_escape_string($format);
|
||||||
$date = date('Y-m-d', strtotime( $date ) );
|
$date = date('Y-m-d', strtotime( $date ) );
|
||||||
@ -35,6 +36,7 @@
|
|||||||
return $session;
|
return $session;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Search for a title
|
||||||
public function filmTittle($idfilm){
|
public function filmTittle($idfilm){
|
||||||
$sql = sprintf("SELECT * FROM film JOIN session ON film.id = session.idfilm WHERE session.idfilm = '%d' ", $idfilm );
|
$sql = sprintf("SELECT * FROM film JOIN session ON film.id = session.idfilm WHERE session.idfilm = '%d' ", $idfilm );
|
||||||
$resul = mysqli_query($this->mysqli, $sql) or die ('Error into query database en sessionData con la id '. $idfilm);
|
$resul = mysqli_query($this->mysqli, $sql) or die ('Error into query database en sessionData con la id '. $idfilm);
|
||||||
@ -99,6 +101,7 @@
|
|||||||
return $sessions;
|
return $sessions;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Look for a title and cinema
|
||||||
public function getSessions_Film_Cinema($idFiml, $idCinema){
|
public function getSessions_Film_Cinema($idFiml, $idCinema){
|
||||||
$sql = sprintf( "SELECT * FROM session WHERE session.idfilm = '%d' AND session.idcinema = '%d' ", $idFiml, $idCinema);
|
$sql = sprintf( "SELECT * FROM session WHERE session.idfilm = '%d' AND session.idcinema = '%d' ", $idFiml, $idCinema);
|
||||||
$resul = mysqli_query($this->mysqli, $sql) or die ('Error into query database');
|
$resul = mysqli_query($this->mysqli, $sql) or die ('Error into query database');
|
||||||
@ -112,6 +115,7 @@
|
|||||||
return $sessions;
|
return $sessions;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Edit Session.
|
||||||
public function editSession($idfilm, $idhall, $idcinema, $date, $startTime, $seatPrice, $format, $origin){
|
public function editSession($idfilm, $idhall, $idcinema, $date, $startTime, $seatPrice, $format, $origin){
|
||||||
$format = $this->mysqli->real_escape_string($format);
|
$format = $this->mysqli->real_escape_string($format);
|
||||||
$date = date('Y-m-d', strtotime( $date ) );
|
$date = date('Y-m-d', strtotime( $date ) );
|
||||||
@ -129,6 +133,7 @@
|
|||||||
return $resul;
|
return $resul;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Delete Session
|
||||||
public function deleteSession($hall, $cinema, $date, $startTime){
|
public function deleteSession($hall, $cinema, $date, $startTime){
|
||||||
|
|
||||||
$sql = sprintf( "DELETE FROM `session` WHERE
|
$sql = sprintf( "DELETE FROM `session` WHERE
|
||||||
|
Loading…
Reference in New Issue
Block a user