ok, i tested searching for delicia directly in the user file and it worked fine. when i'm in another table and want to find the related record (one-to-one) in the related table, it doesn't work. the code i posted earlier for split_decode is for currently active table. i modified it to search in related table:
# --------------------------------------------------------
# Takes one line of the database as input and returns an
# array of all the values. It replaces special mark up that
# join_encode makes such as replacing the '``' symbol with a
# newline and the '~~' symbol with a database delimeter.
my ($input) = shift;
$input =~ s/\Q$db2_delim\E$/$db2_delim /o; # Add a space if we have delimiter new line.
my (@array) = split (/\Q$db2_delim\E/o, $input);
for ($i = 0; $i <= $#array; $i++) {
$array[$i] =~ s/~~/$db2_delim/og; # Retrieve Delimiter..
$array[$i] =~ s/``/\n/g; # Change '' back to newlines..
$array[$i] =~ s/&/&/g; # encode ampersand 02/01/2017
}
return @array;
}
the only thing i changed in this sub is $db_delim to $db2_delim. the code that switches to related table uses $db2_delim.
Code:
sub split_decode2 { # --------------------------------------------------------
# Takes one line of the database as input and returns an
# array of all the values. It replaces special mark up that
# join_encode makes such as replacing the '``' symbol with a
# newline and the '~~' symbol with a database delimeter.
my ($input) = shift;
$input =~ s/\Q$db2_delim\E$/$db2_delim /o; # Add a space if we have delimiter new line.
my (@array) = split (/\Q$db2_delim\E/o, $input);
for ($i = 0; $i <= $#array; $i++) {
$array[$i] =~ s/~~/$db2_delim/og; # Retrieve Delimiter..
$array[$i] =~ s/``/\n/g; # Change '' back to newlines..
$array[$i] =~ s/&/&/g; # encode ampersand 02/01/2017
}
return @array;
}
the only thing i changed in this sub is $db_delim to $db2_delim. the code that switches to related table uses $db2_delim.