The query is simple -> "SELECT * FROM xxx";
When the result comes, it brings only the last result of the table instead all.
If I'm not mistaken, most remote databases come with a limit on the amount of data that is fetched, in order to avoid overflowing results. But none of that is for sure, just my speculation. Anyway, how to solve this?
$stmt = mysqli_stmt_init($conn);
$sql = "SELECT * FROM favorite";
mysqli_stmt_prepare($stmt, $sql);
mysqli_stmt_execute($stmt);
$result = mysqli_stmt_get_result($stmt);
$row = mysqli_fetch_assoc($result);
var_dump($row);