Advertisement
pligg

Jobberbase Applicant Email Export

Jun 17th, 2011
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. <?php
  2. /* Script for exporting email addresses belonging to Jobberbase job applicants */
  3.  
  4. $link = mysql_connect('localhost', 'db_user', 'db_user_pass');
  5. $db_selected = mysql_select_db('db_name', $link);
  6.  
  7. $result = mysql_query("SELECT * FROM job_requests ORDER BY id") or die('MySQL query attempting to select user data failed!');
  8.  
  9.  
  10. while ($row = mysql_fetch_array($result)) {
  11. $emails[] = $row['email'];
  12. }
  13.  
  14. $newData = array_unique($emails);
  15.  
  16. foreach ($newData as $address) {
  17. echo "" . $address . ", \n";
  18. }
  19.  
  20. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement