Delete room_dao.php

This commit is contained in:
Markines16 2021-04-13 21:09:50 +02:00 committed by GitHub
parent 2fef99d5d5
commit 2c2ab7e990
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,39 +0,0 @@
<?php
require_once('../assets/php/dao.php');
include_once('room_dto.php');
class RoomDAO extends DAO {
//Constructor:
function __construct($bd_name){
parent::__construct($bd_name);
}
//Methods:
//Create a new Room.
public function createRoom($id, $idcinema, $numCol, $numRows){
$sql = sprintf( "INSERT INTO rooms( id, idcinema, numCol, numRows)
VALUES ( '%s', '%s', '%i', '%i')",
$id, $idcinema, $numCol, $numRows );
return $sql;
}
//Returns a query to get the room's data.
public function roomData($id){
$sql = sprintf( "SELECT * FROM rooms WHERE id = '%d'", $id );
$resul = mysqli_query($this->mysqli, $sql) or die ('Error into query database');
return $resul;
}
//Create a new Room Data Transfer Object.
public function loadRoom($id, $idcinema, $numCol, $numRows){
return new RoomDTO($id, $idcinema, $numCol, $numRows);
}
}
?>