count_z.php 680 B

123456789101112131415161718192021222324252627
  1. <?php
  2. $host = "kurek620.beget.tech";
  3. $username = "kurek620_baze";
  4. $password = "6910WASD579h";
  5. $database = "kurek620_baze";
  6. $mysql = new mysqli($host, $username, $password, $database);
  7. if($mysql->connect_error){
  8. die("Ошибка подключения". $mysql->connect_error);
  9. }
  10. $query = "SELECT COUNT(*) as count FROM `ZUsers`";
  11. $result = $mysql->query($query);
  12. $row = $result->fetch_assoc();
  13. $countik = $row['count'];
  14. if(!$result){
  15. echo "что-то не так";
  16. }
  17. $query = "SELECT COUNT(*) as count FROM `Orders1`";
  18. $result = $mysql->query($query);
  19. $row = $result->fetch_assoc();
  20. $countik1 = $row['count'];
  21. if(!$result){
  22. echo "что-то не так";
  23. }