<?php

$link = mysqli_connect("localhost","root","root","dbname"); //连接数据库

$sql = "select field from table  limit 1"; 

$ressql = mysqli_query($link,$sql);//执行sql

$res = $ressql->fetch_object()->field;//得到结果

 

相关文章:

  • 2022-12-23
  • 2021-12-17
  • 2021-12-02
  • 2022-12-23
  • 2021-11-05
  • 2022-02-04
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-10-07
  • 2022-12-23
  • 2022-02-05
  • 2021-08-06
相关资源
相似解决方案