Update Post.php

This commit is contained in:
jenkings
2025-05-23 10:57:29 +02:00
committed by GitHub
parent 361ddeaee9
commit 3d4c69801e

View File

@@ -122,21 +122,12 @@ class Post {
$stmt->bindParam("s", $this->status);
$stmt->bindParam("u", $this->updated);
$stmt->bindParam("cr", $this->created);
<?php
if (session_id() == "") session_start();
class Post {
private $postTable = 'articles';
private $categoryTable = 'categories';
private $userTable = 'users';
private $conn;
public function __construct($db){
$result = $stmt->fetch(PDO::FETCH_ASSOC);
return $result['count'];
}
}
?>
if($stmt->execute()){
return $this->conn->lastInsertId();
}
}
}
public function update(){
@@ -200,4 +191,4 @@ class Post {
return $result['count'];
}
}
?>
?>