more Codebase cleanup and refactoring on files mathe.view.php and nav.php
This commit is contained in:
parent
cbabe10ee9
commit
3c2dc70254
5 changed files with 233 additions and 256 deletions
15
index.php
15
index.php
|
|
@ -3,18 +3,5 @@ require 'functions.php';
|
|||
require 'Database.php';
|
||||
require 'router.php';
|
||||
require 'Response.php';
|
||||
//$username = 'appUser';
|
||||
//$password = 'password';
|
||||
//$config = require('config.php');
|
||||
//$db = new Database($config['database'], $username, $password);
|
||||
//$id = $_GET['id'];
|
||||
// Variante 1
|
||||
//$query = "SELECT * FROM posts WHERE id = ?";
|
||||
//$posts = $db->query($query, [$id])->fetchAll(PDO::FETCH_ASSOC);
|
||||
// Variante 2
|
||||
//$query = "SELECT * FROM posts WHERE id = :id";
|
||||
//$posts = $db->query($query, [':id' => $id])->fetchAll(PDO::FETCH_ASSOC);
|
||||
// Beide Varianten machen inhaltlich das Gleiche.
|
||||
// freie Wahl, welche der beiden Varianten bevorzugt wird.
|
||||
|
||||
//dd($posts);
|
||||
//dd($posts);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue