введите описание изображения здесь Код работал в 2017 году Теперь я снова загружаю в свою cpanel, а сообщение не отображается. Сайт не загружает сообщение от Sql. Он показывает нулевой пост. Я думаю это из-за старой версии sql?
<?php
// how many records should be displayed on a page?
$records_per_page = 4;
// include the pagination class
require 'classes/Pagination.php';
// instantiate the pagination object
$pagination = new Pagination();
// the MySQL statement to fetch the rows
$MySQL = 'SELECT Table * FROM covers ORDER BY id DESC LIMIT
' . (($pagination->get_page() - 1) * $records_per_page) . ', ' . $records_per_page . '
';
// if query could not be executed
$result = $db->query($MySQL);
// fetch the total number of records in the table
$myRows = $db->query('SELECT FOUND_ROWS() AS rows');
$rows = $myRows->fetch();
// pass the total number of records to the pagination class
$pagination->records($rows['rows']);
// records per page
$pagination->records_per_page($records_per_page);
$page = $pagination->get_page();
?><div class="row">
<?php
$rows = $result->fetchAll(PDO::FETCH_ASSOC);
$index = 1;
$begin = ($page * $records_per_page) - $records_per_page;
if ($result->rowCount() == 0) {
echo "<div class='alert alert-info'>There are no covers.</div>";
}else{
foreach($rows as $row) {
?>