Advertisement
Guest User

Untitled

a guest
Oct 7th, 2013
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. <?php
  2.  
  3. ini_set('display_errors',1);
  4. ini_set('display_startup_errors',1);
  5. error_reporting(-1);
  6. include_once('includes/connect.php');
  7.  
  8. $q = $db->prepare("SELECT COUNT(id) as records FROM tracker WHERE id = ?");
  9. $q->execute(array($id));
  10. $records = (int) $q->fetch(PDO::FETCH_OBJ)->records;
  11.  
  12. $query = $db->query("SELECT `id`, `votNumber`, `first_last`, `phone`, `city`, `active`, `gender`, `birth_year`, `registration_date` FROM `members` WHERE `id` = $records");
  13.  
  14.  
  15. while($rows = $query->fetch(PDO::FETCH_ASSOC)){
  16.  
  17. echo $rows['id'] . '<br/>';
  18. echo $rows['votNumber'].'<br/>';
  19. echo $rows['first_last'].'<br/>';
  20. echo $rows['phone'].'<br/>';
  21. echo $rows['city'] . '<br/>';
  22. echo $rows['active'].'<br/>';
  23. echo $rows['gender'].'<br/>';
  24. echo $rows['birth_year'].'<br/>';
  25. echo $rows['registration_date'].'<br/>';
  26.  
  27. }
  28. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement