posts table and they will appear here automatically.
PDO::ERRMODE_EXCEPTION, PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC, ]); $stmt = $pdo->query(" SELECT id, title, meta, body, created_at FROM posts WHERE is_published = 1 ORDER BY created_at DESC, id DESC "); $posts = $stmt->fetchAll(); } catch (PDOException $e) { // Fallback: static posts if DB connection fails $dbError = 'DB_connect_failed'; $posts = [ [ 'id' => 0, 'title' => 'Welcome to Mediakor', 'meta' => 'System Log • Fallback', 'body' => 'Database connection failed, so this is the static fallback feed. Once your DB is configured, posts will be served from the posts table.', 'created_at' => null, ], [ 'id' => 0, 'title' => 'Configure Database', 'meta' => 'Setup • Guide', 'body' => 'Edit the DB settings at the top of index.php and create the posts table using the SQL snippet in the comment.', 'created_at' => null, ], ]; } ?>
posts table and they will appear here automatically.