20 lines
747 B
PHP
20 lines
747 B
PHP
<?php
|
|
header('Content-Type: application/json');
|
|
require_once($_SERVER['DOCUMENT_ROOT']."/config.php");
|
|
error_reporting(E_ALL | E_STRICT);
|
|
ini_set('display_errors', 1);
|
|
|
|
$pdopg = new MysqlPdo(hstpg, ndbpg, userpg, passpg, false, '5432', true);
|
|
|
|
$sql_del1 = "DELETE FROM chat_avito WHERE update_at < (current_timestamp - interval '1' month)";
|
|
$pdopg->query($sql_del1);
|
|
|
|
$sql_del1 = "DELETE FROM chat_avito_messages WHERE update_at < (current_timestamp - interval '1' month)";
|
|
$pdopg->query($sql_del1);
|
|
|
|
$sql_del1 = "DELETE FROM cian_chat WHERE update_at < (current_timestamp - interval '1' month)";
|
|
$pdopg->query($sql_del1);
|
|
|
|
$sql_del1 = "DELETE FROM call_events WHERE updated_at < (current_timestamp - interval '1' day)";
|
|
$pdopg->query($sql_del1);
|