Skip to content

Commit

Permalink
Update queries
Browse files Browse the repository at this point in the history
  • Loading branch information
almasaeed2010 committed Aug 25, 2017
1 parent 33859d9 commit c21d97e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
4 changes: 3 additions & 1 deletion src/CLIPrompt.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,10 @@ public function ask($question, $style = NULL) {
$question = $this->applyStyle($question, $style);
}

while (empty($response = readline($question))) {
echo $question;
while (empty($response = readline())) {
$this->error('Please provide a response');
echo $question;
}

return $response;
Expand Down
8 changes: 4 additions & 4 deletions src/Colors.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public function __construct() {
public function str($string, $foreground_color = NULL, $background_color = NULL) {
$colored_string = '';
$colored_padding = '';
$string = ' ' . $string . ' ';
//$string = ' ' . $string . ' ';
$padding = str_pad('', strlen($string), ' ');;

// Check if given foreground color found
Expand All @@ -77,9 +77,9 @@ public function str($string, $foreground_color = NULL, $background_color = NULL)
// Add string and end coloring
$colored_string .= $string . "\033[0m";

$full_string = ' ' . $colored_padding . PHP_EOL;
$full_string .= ' ' . $colored_string . PHP_EOL;
$full_string .= ' ' . $colored_padding;
//$full_string = $colored_padding . PHP_EOL;
$full_string = $colored_string;// . PHP_EOL;
//$full_string .= $colored_padding;
}
else {
$full_string = $colored_string;
Expand Down
2 changes: 1 addition & 1 deletion src/Generator.php
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ protected function validateTerms() {
}

if (!$failed) {
$results = $this->db->query('SELECT CV.name AS cv_name, DB.name AS db_name, DBXREF.accession AS accession
$results = $this->db->query('SELECT CV.name AS cv_name, DB.name AS db_name, DBX.accession AS accession
FROM chado.cvterm AS CVTERM
JOIN chado.cv AS CV ON CVTERM.cv_id = CV.cv_id
JOIN chado.dbxref AS DBX ON CVTERM.dbxref_id = DBX.dbxref_id
Expand Down

0 comments on commit c21d97e

Please sign in to comment.