dedecms用户将信息插入数据库

//生成文章的ID
    $arcID = GetIndexKey($arcrank,$typeid,$sortrank,$channelid,$senddate,$adminid);
    $query1 = "INSERT INTO `#@__archives`(id,typeid,ismake,channel,title,writer,mid)
                  VALUES ('$arcID','47','1','20','$sname','$name','1'); ";
    $dsql->ExecuteNoneQuery($query1);
    //$gid = $dsql->GetLastID();
    $query2 = "INSERT INTO `#@__addon20`(aid,name,tel,sname,who,content,ctime)
                  VALUES ('$arcID','$name','$tel','$sname','$who','$content','$ctime'); ";
    $dsql->ExecuteNoneQuery($query2);
    $query3 = "UPDATE `#@__arctiny` SET typeid = '47', channel = '20' WHERE id = '$arcID'";
    $dsql->ExecuteNoneQuery($query3);
              
    showMsg('点歌成功,等待管理员审核!','/',0,2000);
    exit();


注意:插入文章时,不能只插入到今天加的表中,否则后台不能生成网页。

你可能感兴趣的:(数据库,文章,dedecms,title,content)