*/ $options = array( 'san', 'check', 'verbose', 'help' ); require_once( 'commandLine.inc' ); require_once( 'weedforFK.inc' ); #echo( "Purge Old Text\n\n" ); if( !( @$options['san'] || @$options['check'] ) ) { ShowUsage(); } else { sanitize( @$options['san'], @$options['check'], @$options['verbose'] ); } function ShowUsage() { echo( "MySQL databases don't know about Foreign Keys. Thus, there might be some broken\n"); echo( "rows in some tables left that violate PostgreSQL FK when trying to import.\n\n"); echo( "This prog weeds (hopefuly) everything PostgreSQL foreign keys complain about.\n"); echo( "Run it on MySQL databases, only.\n\n" ); echo( "Usage: php weedforFK.php [--san] [--check] [--verbose]\n\n" ); echo( "san : Performs the sanitizing weeding\n" ); echo( "check : Checks the DB, but leaves it untouched\n" ); echo( "verbose : Report what is done\n" ); echo( "help : Show this usage information\n" ); } ?>