php mysqli

  1 <?php
  2 header("content-type:text/html;charset=utf-8");
  3 $con=mysqli_connect("localhost","root","root","test");
  4 // 检测连接
  5 if (mysqli_connect_errno())
  6 {
  7         echo "连接失败: " . mysqli_connect_error();
  8
  9 }
 10 $result = mysqli_query($con,"SELECT * FROM members WHERE 1 limit 10");
 11 while($row = mysqli_fetch_array($result))
 12 {
 13         echo $row['member_id'] . " " . $row['mobile'];
 14         echo "<br>";
 15 }
 16 ?>

    A+
发布日期:2016年11月21日  所属分类:未分类

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: