<?php
session_start();
include 'config.php';
	
$sql = "SELECT SOBREMAX FROM VALIDE_HORA_PEDWEB";

try {
	$dbh = new PDO("firebird:dbname=$dbname", $_SESSION['usuario'], $_SESSION['clave']);	
	$dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
	$stmt = $dbh->prepare($sql);
	$stmt->execute();
	$IDP = $stmt->fetchAll(PDO::FETCH_OBJ);
	$dbh = null;
	echo '{"items":'. json_encode($IDP) .'}'; 
} catch(PDOException $e) {
	echo '{"items":[{"IDP":"0"}]}'; 
}


?>