new test for exporting CSV with headers
This commit is contained in:
parent
bd9d921ae8
commit
7b385a9518
1 changed files with 2 additions and 3 deletions
|
@ -1041,18 +1041,17 @@ sub select_array {
|
||||||
sub select_array_with_headers {
|
sub select_array_with_headers {
|
||||||
my $req = shift;
|
my $req = shift;
|
||||||
debugprint "PERFORM: $req ";
|
debugprint "PERFORM: $req ";
|
||||||
my @result = `$mysqlcmd $mysqllogin -Bs --column-name -e "\\w$req" 2>>/dev/null`;
|
my @result = `$mysqlcmd $mysqllogin -Bre "\\w$req" 2>>/dev/null`;
|
||||||
if ( $? != 0 ) {
|
if ( $? != 0 ) {
|
||||||
badprint "Failed to execute: $req";
|
badprint "Failed to execute: $req";
|
||||||
badprint "FAIL Execute SQL / return code: $?";
|
badprint "FAIL Execute SQL / return code: $?";
|
||||||
debugprint "CMD : $mysqlcmd";
|
debugprint "CMD : $mysqlcmd";
|
||||||
debugprint "COMMAND: $mysqlcmd";
|
|
||||||
debugprint "OPTIONS: $mysqllogin";
|
debugprint "OPTIONS: $mysqllogin";
|
||||||
debugprint `$mysqlcmd $mysqllogin -Bse "$req" 2>&1`;
|
debugprint `$mysqlcmd $mysqllogin -Bse "$req" 2>&1`;
|
||||||
|
|
||||||
#exit $?;
|
#exit $?;
|
||||||
}
|
}
|
||||||
debugprint "select_array: return code : $?";
|
debugprint "select_array_with_headers: return code : $?";
|
||||||
chomp(@result);
|
chomp(@result);
|
||||||
return @result;
|
return @result;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue