- Code design

- Passing data from users table
This commit is contained in:
2017-09-05 11:30:11 +07:00
parent 1381593163
commit 47d455063f
6 changed files with 139 additions and 86 deletions

View File

@@ -37,10 +37,9 @@ class Post extends \Core\Model
try {
$db = static::connectDB();
$sql = "SELECT * FROM pengumuman WHERE status = ? ORDER BY created_at";
$sql = "SELECT * FROM pengumuman ORDER BY created_at";
$query = $db->prepare($sql);
$query->bindValue(1, 1);
if ($query->execute()) {
if ($query->rowCount() != 0) {