Conditions | 3 |
Paths | 3 |
Total Lines | 18 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
27 | protected function execute(InputInterface $input, OutputInterface $output) |
||
28 | { |
||
29 | $this->detectDbSettings($output); |
||
30 | |||
31 | $sql = $input->getArgument('statement'); |
||
32 | |||
33 | // dump data for all other tables |
||
34 | $exec = 'mysql ' . $this->getMysqlClientToolConnectionString() . " -e '" . $sql . "'"; |
||
35 | |||
36 | if ($input->getOption('only-command')) { |
||
37 | $output->writeln($exec); |
||
38 | } else { |
||
39 | exec($exec, $commandOutput, $returnValue); |
||
40 | if ($returnValue > 0) { |
||
41 | $output->writeln('<error>' . implode(PHP_EOL, $commandOutput) . '</error>'); |
||
42 | } |
||
43 | } |
||
44 | } |
||
45 | |||
46 | } |