<?php
$servername = "localhost";
$username = "root";
$password = "Hq_@_2133335";
$dbname = "b_ocqx1amg20240521";
 
// 创建连接
$conn = mysql_connect($servername, $username, $password, $dbname);
 
// 检查连接
if (!$conn) {
    die("Connection failed");
}
 
$sql = "SELECT * FROM si_users";
$result = mysql_query($sql,$conn);
 
if (mysql_num_rows($result) > 0) {
    // 输出数据
    while($row = mysql_fetch_assoc($result)) {
        echo "id: " . $row["tbID"]. " - Name: " . $row["firstname"]. " " . $row["lastname"]. "<br>";
    }
} else {
    echo "0 results";
}
 
mysql_close($conn);

?>