<?php

//$file = fopen("log.txt", "w");   /// BORRAR LOG
//fwrite($file, "Error $error". PHP_EOL);
//fclose($file);
$ras = $_GET['ras'];
$config = require ('config.php');
$conexion=$config['conexion'];
$conn = pg_connect($conexion);


$sql="select * from control where control='RELOAD'";
$result = pg_query($conn,$sql);
while ($row = pg_fetch_array($result)) {

	$sql="delete from control where control='RELOAD'";
	$result = pg_query($conn,$sql);
	$conn=null;	
	echo 'OK|RELOAD';
	return;

}

pg_close($conn);	
echo 'OK|NADA';

?>