求一句 ACCESS 求和的 SQL 语句 并用PHP ADO读出来

2024-12-21 15:18:11
推荐回答(1个)
回答1:

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