Advertisement
Guest User

show_query.php

a guest
Jul 4th, 2018
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. <?php
  2.  
  3. $server="localhost";
  4. $user="root";
  5. $password="";
  6. $db="bank_database";
  7. $con=mysqli_connect($server, $user, $password, $db);
  8. if(!$con)
  9. die("Not connected". mysqli_error());
  10. else
  11. echo "connect done";
  12.  
  13. $query = "SELECT * FROM customer WHERE city != 'Dhanmondi'";
  14. $result = mysqli_query($con, $query);
  15.  
  16. while($record=mysqli_fetch_array($result)){
  17. echo "$record[0] - $record[1] - $record[2] <br>";
  18. }
  19.  
  20. mysqli_free_result($result);
  21. mysqli_close($con);
  22.  
  23. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement