MYSQL / PHP选择用户排名

时间:2017-11-28 20:21:50

标签: php html mysql web

嗨,我有一个MYSQL数据库就像这样

std::vector<unsigned char> buf;
ReadDataIntoBufferPassedIn(boost::asio::buffer(buf));

我将如何使用php获取它并为其分配变量

1 个答案:

答案 0 :(得分:0)

我希望这可以帮助您解决问题

<?php
$servername = "localhost";
$database = "contoh";
$username = "root";
$password = "root";

$conn = mysqli_connect($servername, $username, $password, $database);

$sql2 = 'SELECT * FROM `user_ranks`';
  $result2 = $conn->query($sql2);
      while($row = $result2->fetch_assoc()) {
          $id = $row['id'];
          $username = $row['username'];
          $password = $row['password'];
          $rank = $row['rank'];
      }