Added host parameter for folks using different hosts cause one is not enough

This commit is contained in:
Akkadius 2015-01-11 19:13:38 -06:00
parent 5c761d3a57
commit 73c29fc2f0

View File

@ -240,17 +240,17 @@ sub Exit{ }
#::: Returns Tab Delimited MySQL Result from Command Line
sub GetMySQLResult{
my $run_query = $_[0];
if($OS eq "Windows"){ return `"$path" --user $user --password="$pass" $db -N -B -e "$run_query"`; }
if($OS eq "Windows"){ return `"$path" --host $host --user $user --password="$pass" $db -N -B -e "$run_query"`; }
if($OS eq "Linux"){
$run_query =~s/`//g;
return `$path --user="$user" --password="$pass" $db -N -B -e "$run_query"`;
return `$path --user="$user" --host $host --password="$pass" $db -N -B -e "$run_query"`;
}
}
sub GetMySQLResultFromFile{
my $update_file = $_[0];
if($OS eq "Windows"){ return `"$path" --user $user --password="$pass" --force $db < $update_file`; }
if($OS eq "Linux"){ return `"$path" --user $user --password="$pass" --force $db < $update_file`; }
if($OS eq "Windows"){ return `"$path" --host $host --user $user --password="$pass" --force $db < $update_file`; }
if($OS eq "Linux"){ return `"$path" --host $host --user $user --password="$pass" --force $db < $update_file`; }
}
#::: Gets Remote File based on URL (1st Arg), and saves to destination file (2nd Arg)