コード例 #1
0
 public function init()
 {
     parent::init();
 }
コード例 #2
0
ファイル: dbcompare.php プロジェクト: sickhye/mysql-dbcompare
foreach (Source::getArgList() as $arg) {
    $longopts[] = "from-{$arg}:";
    $longopts[] = "to-{$arg}:";
}
$options = getopt('', $longopts);
if (isset($options['help'])) {
    usage();
}
if (isset($options['test'])) {
    $options = array();
    $options['from-file'] = 'test/dev.sql';
    $options['to-file'] = 'test/live.sql';
}
define('VERBOSE', isset($options['verbose']));
$from = Source::init('from', $options);
$to = Source::init('to', $options);
$differ = new dbStructUpdater();
$to_sql = $to->getStructure();
$from_sql = $from->getStructure();
if (VERBOSE) {
    notice("*** From SQL: {$from} \n");
    echo $from_sql . "\n\n";
    notice('***');
    notice("*** To SQL: {$to} \n");
    echo $to_sql;
    notice('***');
}
$diffs = $differ->getUpdates($to_sql, $from_sql);
$generated = date('r');
echo "\n#\n# Structure difference between '{$from}' and '{$to}'\n#\n# Generated: {$generated}\n#\n# START DIFF;\n\n";
foreach ($diffs as $diff) {
コード例 #3
0
ファイル: CveSource.php プロジェクト: basvandervlies/pakiti3
 public function init()
 {
     parent::init();
     # Get module ID from the DB
 }