Help for this page

Select Code to Download


  1. or download this
    $sth = $dbh->prepare("SELECT year from trees WHERE sport = \'$sport\' 
    +AND year = + \'$year\'")
        || die "couldn't prepareSQL statement";
    ...
    while (@row = $sth->fetchrow_array()) { 
        $year = $row[0]; 
    }
    
  2. or download this
    $sth = $dbh->prepare('SELECT year 
                FROM trees 
    ...
                    AND 
                year = ?'
            );
    
  3. or download this
    $sth->execute($sport, $year) or 
        die "Can't execute: ". $db->errstr(). "\n";
    
  4. or download this
    my ($year) = $sth->fetchrow();
    
  5. or download this
     
    for (1.. $compsize *2 -1) {
        $teams{"team$_"} = $cgi->param("team$_");
        $scores{"score$_"} = $cgi->param("score$_");
    }
    
  6. or download this
    print "<ul>\n";
    foreach ( $cgi->param) {
        print "<li>$_: '", $cgi->param($_) ,"'\n";
    }
    print "</ul>\n";