Hallo Brotfische
Ich habe hier ein kleines Problem und bräuchte hilfe
Fatal error: Call to a member function execute() on a non-object in C:\xampp\htdocs\Panel\admin_config.php on line 44
if ($mySQLcon->connect_errno) {
echo "Failed to connect to MySQL: (" . $mySQLcon->connect_errno . ") " . $mySQLcon->connect_error;
}
$stmt = $mySQLcon->prepare("SELECT `shopstatus`, `shopname`, `wartungsgrund` FROM `" . $table_settings . "`");
$stmt->execute();
$res = $stmt->get_result();
$row = $res->fetch_assoc();
$shopstatus = htmlentities($row['shopstatus']);
$shopname = htmlentities($row['shopname']);
$wartungsgrund = ($row['wartungsgrund']);
als code:
SQL
if ($mySQLcon->connect_errno) { echo "Failed to connect to MySQL: (" . $mySQLcon->connect_errno . ") " . $mySQLcon->connect_error; } $stmt = $mySQLcon->prepare("SELECT `shopstatus`, `shopname`, `wartungsgrund` FROM `" . $table_settings . "`"); $stmt->execute(); $res = $stmt->get_result(); $row = $res->fetch_assoc(); $shopstatus = htmlentities($row['shopstatus']); $shopname = htmlentities($row['shopname']); $wartungsgrund = ($row['wartungsgrund']);