daily pastebin goal
63%
SHARE
TWEET

Untitled

a guest Jan 18th, 2019 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // above of here, i query the db for the event, i make the $free_spots = $free_spots - 1 after user clicks attending, fetching and defining $max_spot, $free_spots exc.
  2.  
  3. $met_with = $met_with + $max_spot - 1;
  4. try{
  5. $update_member_query = "UPDATE `members` SET  `met_with`=:met_with, `attended` = `attended` +1 WHERE     `id`=:userid";
  6. $update_member_query_do = $db->prepare($update_member_query);
  7. $update_member_query_do->bindParam(':userid', $userid, PDO::PARAM_INT);
  8. $update_member_query_do->bindParam(':met_with', $met_with, PDO::PARAM_INT);
  9. $update_member_query_do->execute() or die(print_r($update_member_query_do->errorInfo(), true));
  10. }
  11.  
  12. catch(PDOException $e) {
  13. $log->logError($e." - ".basename(__FILE__));
  14. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top