Exemplo n.º 1
0
function UpdateID($userID, $idNum, $authority)
{
    include_once 'sqlQuery.php';
    // $isPaperScore $paperID 是int类型,不需要加单引号
    $query = "update userinfo\n    set IDNumber = '{$idNum}',Authority = {$authority}\n    where Account = '{$userID}'";
    return commonQuery($query);
}
Exemplo n.º 2
0
function UpdatePaper($paperID, $paperName, $paperInfo, $paperType, $isPaperScore, $imagePath)
{
    include_once 'sqlQuery.php';
    //$isPaperScore $paperID 是int类型,不需要加单引号
    $query = "update paper \n        set PaperName = '{$paperName}', PaperInfo = '{$paperInfo}', PaperType = '{$paperType}',\n        IsPaperScore = {$isPaperScore}, ImagePath = '{$imagePath}' \n        where PaperID = {$paperID}";
    return commonQuery($query);
}
Exemplo n.º 3
0
function DeleteTestResult($testResultID)
{
    //包含数据库操作文件
    include_once 'sqlQuery.php';
    //生成sql语句
    $query = "delete from testresult\n    where TestResultID = {$testResultID}";
    //返回结果
    return commonQuery($query);
}
Exemplo n.º 4
0
function UpdateQuestionNum($questionID, $questionNum)
{
    include_once 'sqlQuery.php';
    $query = "update question\n    set QuestionNum= {$questionNum} \n    where QuestionID = {$questionID}";
    return commonQuery($query);
}
Exemplo n.º 5
0
function DeleteScoreByPaperID($paperID)
{
    include_once 'sqlQuery.php';
    $query = "delete from score\n        where PaperID = {$paperID}";
    return commonQuery($query);
}
function DeleteSelectResultByPaperID($paperID)
{
    include_once 'sqlQuery.php';
    $query = "delete from selectresult\n    where PaperID = {$paperID}";
    return commonQuery($query);
}