Perl 同时删除?我在上面添加了一个代码示例我尝试过手动清除浏览器缓存,但没有任何区别,会话数据缓存是否未同时清除?我在上面添加了一个代码示例 # Read the standard input (sent by the form): read(STDIN, $F
Perl 同时删除?我在上面添加了一个代码示例我尝试过手动清除浏览器缓存,但没有任何区别,会话数据缓存是否未同时清除?我在上面添加了一个代码示例 # Read the standard input (sent by the form): read(STDIN, $F,perl,Perl,同时删除?我在上面添加了一个代码示例我尝试过手动清除浏览器缓存,但没有任何区别,会话数据缓存是否未同时清除?我在上面添加了一个代码示例 # Read the standard input (sent by the form): read(STDIN, $FormData, $ENV{'CONTENT_LENGTH'}); # Get the name and value for each form input: @pairs = split(/&/, $FormData); # Then
同时删除?我在上面添加了一个代码示例我尝试过手动清除浏览器缓存,但没有任何区别,会话数据缓存是否未同时清除?我在上面添加了一个代码示例
# Read the standard input (sent by the form):
read(STDIN, $FormData, $ENV{'CONTENT_LENGTH'});
# Get the name and value for each form input:
@pairs = split(/&/, $FormData);
# Then for each name/value pair....
$db = DBI->connect($conn->DataSource(), $conn->Username(), $conn->Password()) or die "Unable to connect: $DBI::errstr\n";
foreach $pair (@pairs)
{
# Separate the name and value:
($name, $value) = split(/=/, $pair);
#replace + with space as + means space when data is collected
$value =~ tr/+/ /;
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
# Store values in a hash called %FORM:
$FORM{$name} = $value;
}
$query = $db->prepare("SELECT * FROM person WHERE Name = '".$FORM{'PName'}."' AND Age = '".$FORM{'Age'}."' AND Location = '".$FORM{'Location'}."'");
$query->execute();
# BIND TABLE COLUMNS TO VARIABLES
$query->bind_columns(undef, \$name, \$age, \$location);
# LOOP THROUGH RESULTS
$row = 0;
while($query->fetch())
{
push @Peeps, Person->New();
$Peeps[$row]->Name($name);
$Peeps[$row]->Age($age);
$Peeps[$row]->Location($location);
$row++;
}
$db->disconnect(); #disconnect from the db
print '<table>';
for($i = 0; $i <= $#Peeps; $i++)
{
print "<tr><td>$Peeps[$i]{'NAME'}</td><td>$Peeps[$i]{'AGE'}</td><td>$Peeps[$i]{'LOCATION'}</td></tr>";
}
print '</table>';
$db->disconnect(); #disconnect from the db
$dbh->prepare("SELECT ... WHERE This = ? AND That = ?")
$dbh->execute($this, $that);