Gossamer Forum
Home : General : Perl Programming :

Re: [delicia] problem with colon as delimiter

Quote Reply
Re: [delicia] problem with colon as delimiter In reply to
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:

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/&/&amp;/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.
Subject Author Views Date
Thread; hot thread problem with colon as delimiter delicia 10058 May 7, 2020, 1:33 PM
Post; hot thread Re: [delicia] problem with colon as delimiter
delicia 9894 May 7, 2020, 1:36 PM
Thread; hot thread Re: [delicia] problem with colon as delimiter
Andy 9890 May 7, 2020, 11:33 PM
Thread; hot thread Re: [Andy] problem with colon as delimiter
delicia 9889 May 8, 2020, 5:43 AM
Thread; hot thread Re: [delicia] problem with colon as delimiter
Andy 9878 May 8, 2020, 5:52 AM
Thread; hot thread Re: [Andy] problem with colon as delimiter
delicia 9879 May 8, 2020, 5:59 AM
Thread; hot thread Re: [delicia] problem with colon as delimiter
delicia 9875 May 8, 2020, 6:10 AM
Post; hot thread Re: [delicia] problem with colon as delimiter
Andy 9867 May 8, 2020, 6:18 AM
Thread; hot thread Re: [delicia] problem with colon as delimiter
Andy 9863 May 8, 2020, 6:45 AM
Post; hot thread Re: [Andy] problem with colon as delimiter
delicia 9855 May 8, 2020, 7:05 AM
Thread; hot thread Re: [delicia] problem with colon as delimiter
Andy 9859 May 8, 2020, 6:48 AM
Thread; hot thread Re: [Andy] problem with colon as delimiter
delicia 9855 May 8, 2020, 7:06 AM
Thread; hot thread Re: [delicia] problem with colon as delimiter
Andy 9849 May 8, 2020, 7:27 AM
Thread; hot thread Re: [Andy] problem with colon as delimiter
delicia 9846 May 8, 2020, 7:34 AM
Post; hot thread Re: [delicia] problem with colon as delimiter
Andy 9816 May 8, 2020, 10:49 PM