sum(score)是表达式,ADO只认字段名,你给这表达式加个别名吧,如$sql = "select sum(score) total_score from student";$allscore=$rst->Fields["total_score"]->Value;