Added function to entry remove categories

This commit is contained in:
2017-09-06 11:50:45 +07:00
parent 01ce24fd39
commit 1ee4ca3730
4 changed files with 117 additions and 39 deletions

View File

@@ -29,6 +29,7 @@ class Post extends \Core\Model
[
'id int(3) NOT NULL AUTO_INCREMENT',
'category varchar(20) NOT NULL',
'status tinyint NOT NULL DEFAULT 1',
'PRIMARY KEY (id)'
]
);
@@ -88,7 +89,7 @@ class Post extends \Core\Model
try {
$db = static::connectDB();
$sql = "SELECT * FROM kategori";
$sql = "SELECT * FROM kategori WHERE status = 1";
$query = $db->prepare($sql);