A better way to make a connection to the database

This commit is contained in:
pikami
2016-06-16 15:33:16 +00:00
parent 4c1f18c593
commit e9ccb5c919
11 changed files with 48 additions and 32 deletions

View File

@@ -1,6 +1,7 @@
<?php
include_once "config/config.php";
function RemoveExpiredPastes(){
$conn = GetConnectionToDB();
$time = time();
$stmt = $conn->prepare("DELETE from `pastes` where `expire`<:time and `expire`>0");
$stmt->bindValue(':time', $time);