function get_post_old($param_name_article)
{
global $connect;
$stmt = mysqli_prepare($connect, "SELECT post_id, post_title FROM post WHERE post_link = ?");
mysqli_stmt_bind_param($stmt, "s", $param_name_article);
mysqli_execute($stmt);
mysqli_stmt_bind_result($stmt, $post_id, $post_title);
if(!$stmt)
{
echo 'Ошибка запроса!';
exit();
}
while($post_old = mysqli_stmt_fetch($stmt))
{
$post_old['manth'] = mb_substr($post_old['post_date'], 5, 2);
$post_old['manth'] = manth($post_old['manth']);
$post_old['years'] = mb_substr($post_old['post_date'], 0, 4);
$post_old['day'] = ltrim(mb_substr($post_old['post_date'], 8, 2), '0');
$res_post_old[] = $post_old;
}
mysqli_stmt_close($stmt);
return $res_post_old;
}