<?php


define('DB_SERVER', 'localhost');
define('DB_USERNAME', 'Restax_final');

define('DB_PASSWORD', 'Restax_final123');

define('DB_NAME', 'Restax_api_data');  

$con = new mysqli(DB_SERVER, DB_USERNAME, DB_PASSWORD, DB_NAME);

$blockid = $request->getAttribute('blockid');
$floorid = $request->getAttribute('floorid');


if(mysqli_connect_errno())
{
	echo "Failed to connect mysqli".mysqli_connect_errno();
}


/////get room number block id number/////

$sql_seat="SELECT set_seats.*,set_rooms.room_name FROM set_seats INNER JOIN set_rooms ON set_seats.set_rooms_room_id =set_rooms.room_id WHERE set_seats.set_blocks_block_id = '$blockid' AND set_seats.floors = '$floorid'";

$result_seat=mysqli_query($con,$sql_seat);



    while ($row_seat[]=mysqli_fetch_assoc($result_seat)) {  


$user_seat = $row_seat;





}



  echo json_encode($user_seat);
?>