Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Aug 8th, 2012  |  syntax: PHP  |  size: 0.31 KB  |  hits: 9  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <?php
  2. //Compteur d'eggs
  3. $query_sum = $db->prepare('SELECT SUM(points) AS total_points FROM easter_gest WHERE id_member = :id_member');
  4. $query_sum->bindValue(':id_member', $userid, PDO::PARAM_INT);
  5. $query_sum->execute();
  6.  
  7. $result = $query_sum->fetch(PDO::FETCH_OBJ);
  8.  
  9. $total_points = $result->total_points;
  10. ?>