<?phpheader("Content-Type: text/html;charset=utf-8");$servername = "localhost";$username = "root";$password = "168168";$dbname = "mypet"; //数据库名
// 创建连接$conn = new mysqli($servername, $username, $password, $dbname);$conn->query('set names utf8');// Check connectionif ($conn->connect_error) { die("连接失败: " . $conn->connect_error);} $sql = "SELECT * FROM `user`";// $sql = "SELECT * FROM `mypet`";// $sql = "SELECT * FROM `ggbond`%
What's the meaning? Next time I will post the code and screenshots. If you want to join the tables, use join. If there are two unrelated tables, just check twice. https://www.runoob.com/mysql/mysql-join.html This is a tutorial on joint table query