Fixed entry post issue

This commit is contained in:
2017-10-26 10:12:23 +07:00
parent b3c27d513d
commit b4fe18f5b5
8 changed files with 44 additions and 38 deletions

View File

@@ -27,8 +27,9 @@ class Pengumuman
$sql = "SELECT
pengumuman.id, pengumuman.category as category,
kategori.category as categoryName, kategori.background as background, kategori.foreground as foreground,
pengumuman.created_at, pengumuman.valid_at, pengumuman.expired_at, pengumuman.creator, pengumuman.edited_at, pengumuman.content, pengumuman.status, pengumuman.delay
FROM pengumuman INNER JOIN kategori ON pengumuman.category = kategori.id";
pengumuman.created_at, pengumuman.valid_at, pengumuman.expired_at, pengumuman.creator, pengumuman.edited_at, pengumuman.content, pengumuman.status, pengumuman.delay,
users.full_name as creatorName
FROM pengumuman INNER JOIN kategori ON pengumuman.category = kategori.id INNER JOIN users ON pengumuman.creator = users.id";
if ($conditions) {
$sql .= " WHERE";
@@ -71,11 +72,11 @@ class Pengumuman
public static function showAll($table, $conditions = [])
{
$sql = "SELECT
pengumuman.id, pengumuman.category as category,
kategori.background as background, kategori.foreground as foreground,
created_at, valid_at, expired_at, creator, edited_at, content, pengumuman.status, delay,
users.full_name as creatorName
FROM pengumuman INNER JOIN kategori ON pengumuman.category = kategori.id INNER JOIN users ON pengumuman.creator = users.id";
pengumuman.id, pengumuman.category as category,
kategori.category as categoryName, kategori.background as background, kategori.foreground as foreground,
pengumuman.created_at, pengumuman.valid_at, pengumuman.expired_at, pengumuman.creator, pengumuman.edited_at, pengumuman.content, pengumuman.status, pengumuman.delay,
users.full_name as creatorName
FROM pengumuman INNER JOIN kategori ON pengumuman.category = kategori.id INNER JOIN users ON pengumuman.creator = users.id";
if ($conditions) {
$sql .= " WHERE";