Reputation: 187
I wrote a PHP script to list all the tables present in the database using a query
$query = "SHOW TABLES FROM $dbName";
Now, i wanted to know what sql query can be use to list the "contents" of all the tables from the database simultaneously to display it and then store it in a file.
Thanks ahead of time..
Upvotes: 0
Views: 3090
Reputation: 4591
IF what you want is to backup your database and restore it check out this link
and you can use this command to create a backup of your databse
Upvotes: 0
Reputation: 7081
You can use mysqldump to dump all the data in the database. Else you can run for look on all the table names and then use select * from x; to get all the data from the table name x which you retrieved earlier.
Upvotes: 2