I don't know what went wrong, but it doesn't work. It doesn't print out the result. I tried so many solutions for the query but. Maybe someone can help me.
<?php
$hostname = "localhost";
$username = "root";
$password = "";
$databaseName = "dbapp";
$db = mysqli_connect($hostname, $username, $password, $databaseName);
if(!$db) {
exit("Connection failed: ".mysqli_connect_error());
}
$query = "SELECT id FROM datas";
$result = mysqli_query($db, $query);
print($result);
?>