Prvni pokus o osamostatneni carovych kodu, bohuzel to rozbilo asistenty a razeni...
[mirrors/SokoMan.git] / dump_sql.php
1 #!/usr/bin/php
2 <?php
3 if(isset($_SERVER['REQUEST_METHOD'])) die('Not for you');
4 $nodump = array('item','model','barcode');
5 require_once('sklad.conf.php');
6
7 $ignore = '';
8 $nodata = '';
9 foreach($nodump as $t) {
10 $ignore .= ' --ignore-table='.DB_NAME.'.'.$t;
11 $nodata .= ' '.$t;
12 }
13
14 system('mysqldump -u'.DB_USER.' -p'.DB_PASS.' '.DB_NAME.$ignore);
15 if($nodata != '') system('mysqldump -u'.DB_USER.' -p'.DB_PASS.' '.DB_NAME.' --skip-comments --no-data'.$nodata);
This page took 0.375013 seconds and 5 git commands to generate.