SHARE
TWEET

Untitled

a guest Jun 20th, 2019 52 in 336 days
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.   $conn = new mysqli("localhost", "root", "", "mysql");
  3.  
  4.   if ($conn->connect_error) {
  5.     die("Ошибка: не удается подключиться: " . $conn->connect_error);
  6.   }
  7.  
  8.   echo 'Вы подключились к базе данных.<br>';
  9.  
  10.   $result = $conn->query("SELECT Host FROM user");
  11.  
  12.   echo "Количество строк: $result->num_rows";
  13.  
  14.  
  15.   $result->close();
  16.  
  17.   $conn->close();
  18.  
  19.  
  20. ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top