This commit is contained in:
wlx 2014-06-24 09:02:48 +00:00
parent 43d6c490d3
commit 20e1d96b7e
1 changed files with 6 additions and 2 deletions

View File

@ -154,10 +154,14 @@ class Order
$uid = view::User('id'); $uid = view::User('id');
} }
$sql = "select count(*) as cnt from dataorder where status=1 and userid=".$uid;
$row=$this->db->FetchRow($sql);
if ($row['cnt']>$this->config->download->max) return "一次申请不能大于5条数据请移除部分数据。";
if($id == -1) if($id == -1)
{ {
$sql = $this->db->quoteInto("update dataorder set status=2 where status=1 and userid=?",$uid); $sql = $this->db->quoteInto("update dataorder set status=2 where status=1 and userid=?",$uid);
if($this->db->exec($sql)) if($this->db->exec($sql))
{ {
return true; return true;
}else{ }else{