Advertisement
Guest User

show_query.php

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