mirror of
https://github.com/pikami/palm-paste.git
synced 2025-12-20 09:19:49 +00:00
A better way to make a connection to the database
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user