Guest User

Untitled

a guest
Feb 24th, 2018
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. <?php
  2. requere("../core/connaect.php"); // connetion of database "host,user,pass,db" wrap as $con;
  3.  
  4. $query = "SHOW TABLES FROM mydb"; // the query
  5.  
  6. $result = mysqli_query($con,$query); // check is database have table
  7. if($result){
  8. echo "ok";
  9. $rows = mysqli_fetch_all($result); // fetch all
  10. print_r($rows); //output name of tables
  11. }else{
  12. echo $con->error;
  13. }
  14.  
  15. $con->close(); // close connection from database
  16. ?>
Add Comment
Please, Sign In to add comment