<?php
require("../conectar.php");
extract($_POST);
$sql="SELECT count(id_pago) tot FROM pagos p WHERE p.valadmon='s' AND '$finicio' BETWEEN p.f_entrada AND p.f_salida AND p.propiedad=$prop AND p.clave=$dep AND p.id_concepto <> $id";
//$sql="SELECT count(id_pago) tot FROM pagos p WHERE p.valadmon='s' AND '2012-08-01' BETWEEN p.f_entrada AND p.f_salida AND p.propiedad=4 AND p.clave=35";
$con = mysql_query($sql);
$resp=mysql_fetch_array($con);

$resp = array('total'=>$resp['tot']);
echo json_encode($resp);
?>