} if ($_GET['count']) { $odrer_query .= " LIMIT " . $_GET['count'] . "," . ($_GET['count'] + 20); } echo '<script>document.title="' . $title . '";</script>'; $link = mysqli_connect('127.0.0.1', 'solarstu_yan', 'zev1982z', 'solarstu_meow'); mysqli_set_charset($link, "utf8"); if (!$link) { echo mysqli_connect_error(); } $howmuch = 0; //echo $odrer_query; if ($result = mysqli_query($link, "SELECT * FROM Product" . $odrer_query)) { $count = 1; while ($row = mysqli_fetch_assoc($result)) { $tovar->construct($row['product_name'], $row['src'], $row['price'], $row['id'], $row['manufact_id'], $row['pet_type_id'], $row['comment_text']); if ($count % $n == 0) { //echo "<br>"; } $count++; } } if ($result1 = mysqli_query($link, "SELECT COUNT(*) as howmuch FROM Product" . $odrer_query)) { while ($row1 = mysqli_fetch_assoc($result1)) { $howmuch = $row1['howmuch']; } } if (!$howmuch) { echo "<br/>"; echo '<div id="header"><div id="not_found" align="center">По Вашему запросу ничего не найдено.</div></div>'; }