This commit is contained in:
wlx 2014-06-24 09:03:03 +00:00
parent 0526231290
commit fc16907197
1 changed files with 7 additions and 3 deletions

View File

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