Guest User

Untitled

a guest
Jan 18th, 2019
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  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. }
Add Comment
Please, Sign In to add comment