diff options
author | Rafael Bodill <rafi@sortex.co.il> | 2014-09-19 17:36:51 +0200 |
---|---|---|
committer | Rafael Bodill <rafi@sortex.co.il> | 2014-09-19 17:36:51 +0200 |
commit | 8082cc98e7ebc9a27dcf8a8a4e6ee24dc71af1f3 (patch) | |
tree | 52b92bc5eea38d9eb17674e6fb2b4244d9501cc0 /application/controllers/user.php | |
parent | 1a007fc8e7bf71fc5e292929af00a15bcac6b2c2 (diff) |
where_in for in array queries a proper count usage
Diffstat (limited to 'application/controllers/user.php')
-rw-r--r-- | application/controllers/user.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/application/controllers/user.php b/application/controllers/user.php index a9e50d742..57c6498b1 100644 --- a/application/controllers/user.php +++ b/application/controllers/user.php @@ -175,13 +175,13 @@ class User extends MY_Controller { $userid = $this->muser->get_userid(); - $query = $this->db->select('user') - ->from('action') + $invitations = $this->db->select('user') + ->from('actions') ->where('user', $userid) ->where('action', 'invitation') ->count_all_results(); - if ($query["count"] + 1 > 3) { + if ($invitations + 1 > 3) { show_error("You can't create more invitation keys at this time."); } |