Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
358 views
in Technique[技术] by (71.8m points)

大佬们知道怎么用php获得到数据库某个字段最大数值吗?

这是我的PHP代码,SELECT max(pass) FROM passdata在数据库中是可以查询到最大值的,但是我的php不能将最大值给$sql是怎么回事呀?我这里就像输出passdata表中pass字段的最大值,大佬们帮我看看呗

$sql = "SELECT max(`pass`) FROM `passdata`";
    $conn->query("set names utf8");
  
    echo $sql;

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神解答

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

57.0k users

...