Advertisement
Guest User

Untitled

a guest
Jun 12th, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. <?php
  2.  
  3. $host = "localhost";
  4. $user = "statistics";
  5. $pass = "akecbdy6";
  6. $db = "stats";
  7. $table = "testing";
  8. $connection = mysql_connect($host, $user, $pass) or die ("Unable to connect");
  9. mysql_select_db($db) or die ("Unable to select database");
  10.  
  11. $result= "SELECT * FROM $table ORDER BY id;";
  12.  
  13. $id = array();
  14. $company = array();
  15. $cpa = array();
  16.  
  17. if ($result && mysql_num_rows($result)) {
  18. while (($row = mysql_fetch_assoc($result)) !== false) {
  19. $id[] = $row['id'];
  20. $company[] = $row['company'];
  21. $cpa[] = $row['cpa'];
  22. }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement