Commit 7ef550b6 by doszhang

dos

parent 2ac14aac
...@@ -43,7 +43,7 @@ class IndexController extends Controller ...@@ -43,7 +43,7 @@ class IndexController extends Controller
$now = time(); $now = time();
$type = 1; $type = 1;
$c = M('prize')->where(array( $c = M('prize')->where(array(
'type' => $type, 'prize_type' => $type,
))->count(); ))->count();
if ($c >= 20) { if ($c >= 20) {
return false; return false;
...@@ -51,6 +51,7 @@ class IndexController extends Controller ...@@ -51,6 +51,7 @@ class IndexController extends Controller
$prize = M('Prize')->where(array( $prize = M('Prize')->where(array(
'is_get' => 0, 'is_get' => 0,
'prize_type' => $type,
'uid' => 0 'uid' => 0
))->order('rand()')->limit(1)->find(); ))->order('rand()')->limit(1)->find();
if (!$prize) { if (!$prize) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment