<?php//open database connection$mysqli = new mysqli(<host>,<username>,<password>,<schema>);//Display error messageif ($mysqli->connect_error) {die('Error : ('. $mysqli->connect_errno .') '. $mysqli->connect_error);}$sql="SELECT TABLE_NAME FROM information_schema.TABLES WHERE TABLE_SCHEMA = <schema name>";$result=$mysqli->query($sql);while ( $tables = $result->fetch_assoc()){echo "<br>".$tables['TABLE_NAME'];}// Free memory by clearing result$result->free();// close connection$mysqli->close();?>
0 comments:
Post a Comment