mirror of
https://github.com/pikami/palm-paste.git
synced 2026-10-21 00:24:48 +01:00
A better way to make a connection to the database
This commit is contained in:
1 parent
4c1f18c593
commit
e9ccb5c919
11 files changed
+48
-32
No files matched your search
@@ -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