Advertisement
Guest User

Untitled

a guest
Nov 8th, 2016
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. <?php
  2. $servername = "localhost";
  3. $username = "admin";
  4. $password = "admin";
  5. $dbname = "klaabr";
  6.  
  7. // Create connection
  8. $conn = new mysqli($servername, $username, $password, $dbname);
  9. // Check connection
  10. if ($conn->connect_error) {
  11. die("Connection failed: " . $conn->connect_error);
  12. }
  13.  
  14. $sql = "SELECT * FROM sviesaforo_tipas";
  15. $result = $conn->query($sql);
  16.  
  17.  
  18. if ($result->num_rows > 0) {
  19. // output data of each row
  20. $i=0;
  21. while($row = $result->fetch_assoc()) {
  22. if ($row["ArZalia_2"] > 0) {
  23. $globalus = $row["ArZalia_2"];
  24. }
  25. }
  26. }
  27.  
  28.  
  29. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement