mirror of
				https://github.com/asterisk/asterisk.git
				synced 2025-10-31 10:47:18 +00:00 
			
		
		
		
	Separate multiple items encoded into a single field with ';'
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@126021 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
		| @@ -57,7 +57,9 @@ if ($mode eq 'single') { | ||||
| 	$sth->execute() || throw_error("Invalid query: $sql"); | ||||
| 	$row = $sth->fetchrow_hashref(); | ||||
| 	foreach (keys %$row) { | ||||
| 		push @answer, encode($_) . "=" . encode($row->{$_}); | ||||
| 		foreach my $item (split /\;/, $row->{$_}) { | ||||
| 			push @answer, encode($_) . "=" . encode($item); | ||||
| 		} | ||||
| 	} | ||||
| 	$sth->finish(); | ||||
| 	$dbh->disconnect(); | ||||
| @@ -74,7 +76,9 @@ if ($mode eq 'single') { | ||||
| 	while (my $row = $sth->fetchrow_hashref()) { | ||||
| 		@answer = (); | ||||
| 		foreach (keys %$row) { | ||||
| 			push @answer, encode($_) . "=" . encode($row->{$_}); | ||||
| 			foreach my $item (split /\;/, $row->{$_}) { | ||||
| 				push @answer, encode($_) . "=" . encode($item); | ||||
| 			} | ||||
| 		} | ||||
| 		print join("&", @answer) . "\n"; | ||||
| 	} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user