i upgrade my code from mysql to mysqli.
I edit the mysql query line and now comes the error
Warning: Undefined variable $link
Fatal error: Uncaught TypeError: mysqli_query(): Argument #1 ($mysql) must be of type mysqli, null given**
function getSystemparameter($parameter) {
$ergebnis = mysqli_query($link, "select wert from systemparameter where parameter='$parameter'");
$zeile = mysqli_fetch_row($ergebnis);
return $zeile[0];
My Database Connection:
function connectDatabase() {
include('./serverConfig.php');
$link = mysqli_connect($SQLURL, $SQLBenutzer, $SQLPasswort) or die ("Keine Verbindung !");
if (!$link) {
die('Could not connect: ' . mysqli_error());
}
mysqli_select_db($link,$DB) or die ("Kann DB nicht öffnen !");
return $link;
Nothing idea for a solution.