Time to generate Page

This commit is contained in:
Michał Gdula 2022-10-12 15:43:32 +00:00
parent 646b41e90a
commit e7a2284809
9 changed files with 61 additions and 19 deletions

View file

@ -68,7 +68,9 @@
<?php
// Reading images from table
$sql_start = microtime(true);
$sql = "SELECT * FROM images WHERE author = ? ORDER BY id DESC";
$sql_end = microtime(true);
if ($stmt = mysqli_prepare($conn, $sql)) {
// Bind variables to the prepared statement as parameters
@ -104,6 +106,11 @@
}
echo "</div>";
} else {
echo "<div class='info-text defaultFonts' style='text-align: center !important;'>
<h1>Nothing here!</h1>
<p>Come back later when the user uploads something!</p>
</div>";
}
}
?>