$Scores = array();$dsql->SetQuery("SELECT * FROM `#@__scores` ORDER BY id ASC");$dsql->Execute();while($rs = $dsql->GetArray()){array_push($Scores,$rs);}
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/29 10:50:38
$Scores = array();$dsql->SetQuery("SELECT * FROM `#@__scores` ORDER BY id ASC");$dsql->Execute();while($rs = $dsql->GetArray()){array_push($Scores,$rs);}
$Scores = array();
$dsql->SetQuery("SELECT * FROM `#@__scores` ORDER BY id ASC");
$dsql->Execute();
while($rs = $dsql->GetArray())
{
array_push($Scores,$rs);
}
$Scores = array();$dsql->SetQuery("SELECT * FROM `#@__scores` ORDER BY id ASC");$dsql->Execute();while($rs = $dsql->GetArray()){array_push($Scores,$rs);}
// php代码
$Scores = array();
// 定义了一个空的数组,变量名 $Scores
$dsql->SetQuery("SELECT * FROM `#@__scores` ORDER BY id ASC");
// 使用 DedeCMS 的一个数据库类
$dsql->Execute();
// 执行 SQL 语句
while($rs = $dsql->GetArray())
{
array_push($Scores,$rs);
}
// 根据查询出来的结果,循环把结果写入到开始定义的数组 $Scores 中.
// 整段代码的意思就是把一个表的数据写入一个数组