嗨,我有一个MYSQL数据库就像这样
std::vector<unsigned char> buf;
ReadDataIntoBufferPassedIn(boost::asio::buffer(buf));
我将如何使用php获取它并为其分配变量
答案 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'];
}