12345678910111213141516 |
- <?php
- $host = "provalgk.beget.tech";
- $username = "provalgk_user";
- $password = "Qwer123.";
- $database = "provalgk_user";
- $mysql = new mysqli($host, $username, $password, $database);
- // Проверка соединения
- if($mysql->connect_error){
- die("Ошибка подключения". $mysql->connect_error);
- }
- $query = "SELECT COUNT(*) AS count FROM reviews";
- $result = $mysql->query($query);
- $row = $result->fetch_assoc();
- $count = $row['count'];
- echo "$count";
- ?>
|