Articles

Affichage des articles associés au libellé Php tutorial mysql database

How to extract tables in mysql database using php script

Image
Here is the tutorial video:  https://www.youtube.com/watch?v=kRO2HyHZbWQ This is PHP script to extract tables in mysql database :  <?php /** *Modified by: www.ddroid509ht.com */ //MySQL server and database $dbhost = 'localhost'; $dbuser = 'root'; $dbpass = ''; $dbname = 'dblogin'; $tables = '*'; //Call the core function backup_tables($dbhost, $dbuser, $dbpass, $dbname, $tables); //Core function function backup_tables($host, $user, $pass, $dbname, $tables = '*') {     $link = mysqli_connect($host,$user,$pass, $dbname);     // Check connection     if (mysqli_connect_errno())     {         echo "Failed to connect to MySQL: " . mysqli_connect_error();         exit;     }     mysqli_query($link, "SET NAMES 'utf8'");     //get all of the tables     if($tables == '*')     {         $tables = array();...