Revision 331
Added by stefan over 19 years ago
| backup-sql.php | ||
|---|---|---|
| 30 | 30 |
if(!isset($_POST['backup'])){
|
| 31 | 31 |
header('Location: ../');
|
| 32 | 32 |
exit(0); |
| 33 |
} |
|
| 34 |
|
|
| 33 |
}
|
|
| 34 |
|
|
| 35 | 35 |
// Include config |
| 36 | 36 |
require_once('../../config.php');
|
| 37 | 37 |
|
| ... | ... | |
| 49 | 49 |
"\n"; |
| 50 | 50 |
|
| 51 | 51 |
// Get table names |
| 52 |
$result = $database->query("SHOW TABLES");
|
|
| 52 |
// Use this one for ALL tables in DB |
|
| 53 |
$query = "SHOW TABLES"; |
|
| 53 | 54 |
|
| 55 |
if ($_POST['tables']=='WB') {
|
|
| 56 |
// Or use this to get ONLY wb tables |
|
| 57 |
$prefix=str_replace('_','\_',TABLE_PREFIX);
|
|
| 58 |
$query = "SHOW TABLES LIKE '".$prefix."%'"; |
|
| 59 |
} |
|
| 60 |
|
|
| 61 |
$result = $database->query($query); |
|
| 62 |
|
|
| 54 | 63 |
// Loop through tables |
| 55 | 64 |
while($row = $result->fetchRow()) {
|
| 56 | 65 |
//show sql query to rebuild the query |
Also available in: Unified diff
John: New option in backup tool - either export all tables in database or only WB specific.