Guest User

Untitled

a guest
Jun 21st, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. <?
  2. $new_bal = $user_bal - $this->view->contest_details->entry_fee;
  3. $where = array();
  4. $where[] = $users_tab->getAdapter()->quoteInto('username = ?', $username);
  5. if($this->view->contest_details->contest_type == 'free') {
  6. $data = array(
  7. 'points' => $new_bal,
  8. );
  9. } else {
  10. $data = array(
  11. 'money' => $new_bal,
  12. );
  13. }
  14. $data['updated'] = time();
  15. $row_cnt = $users_tab->update($data, $where);
  16. if($row_cnt < 1) {
  17. return false;
  18. }
  19. ?>
Add Comment
Please, Sign In to add comment