I want to get a single value(aktiv) out of a table called wartung.
include('blog/includes/db_connect.php');
$query = $db->prepare("SELECT * FROM wartung");
$query->execute();
$query->bind_result($wartung_id, $aktiv, $grund);
The value of aktiv in the database is 1.
but this code doesn’t get this 1 into the $aktiv variable.
PS: I’m not used to code with MySQL and PHP so if there is a beginner-bug please don’t be mad.
Try: