My problem is that the following query of a database returns nothing, not null, nothing.
The database looks like this: The "yt" database has a table called "videos". This table has the primary key "id_int" and the varchar "video_id". There are two values in this: Values
Here I create the connection:
$servername = "localhost";
$username = "yt";
$password = "";
$dbname = "yt";
$conn = new mysqli($servername, $username, $password, $dbname);
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
Now here is the query itself:
$sql = "SELECT MAX(id_int) AS max_page FROM videos;";
$result = $conn->query($sql);
$row = mysql_fetch_array($result);
echo $row;
echo $row["max_page"];
echo "Test";
However, the output is "Test", just to show you that the code actually gets executed. I have no idea what could be the problem, I would appreciate some help. Thank you very much in advance.