select t1.user_id, t1.username, t2.phone_number from 表1 as t1 left join 表2 as t2 on t1.user_id=t2.user_id
这样的程序是会显示一行,有三列,如果需要显示所有行,需要用循环,例如:while ($result = mysqli_fetch_array($query))
echo $result['uid'] . $result['zh'] . $result['mm'] . "<br>\n";
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)