Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- requere("../core/connaect.php"); // connetion of database "host,user,pass,db" wrap as $con;
- $query = "SHOW TABLES FROM mydb"; // the query
- $result = mysqli_query($con,$query); // check is database have table
- if($result){
- echo "ok";
- $rows = mysqli_fetch_all($result); // fetch all
- print_r($rows); //output name of tables
- }else{
- echo $con->error;
- }
- $con->close(); // close connection from database
- ?>
Add Comment
Please, Sign In to add comment