Help for this page

Select Code to Download


  1. or download this
    my $sql_stmnt = "SELECT emp_id, CONCAT(emp_last, ', ', emp_first), dep
    +t_name
                     FROM sys_main.humans, sys_main.depts 
    ...
                     ORDER BY '$sort'";
    my $sth = $dbh->prepare($sql_stmnt);
    $sth->execute();
    
  2. or download this
    my $sth = $dbh->prepare_cached(<<"+++end_of_sql_statement");
      SELECT emp_id, CONCAT(emp_last, ', ', emp_first), dept_name
    ...
    +++end_of_sql_statement
    
    $sth->execute($sort);
    
  3. or download this
    $q->start_html(-title=>'Employee Table', -bgcolor=>'#FFFFFF', 
                      -link=>'#4682B4', -vlink=>'#5F9EA0',
    ...
    
    $q->start_table({-width=>'450', -border=>'0',
                        -cellpadding=>'2', -cellspacing=>'0'})
    
  4. or download this
    my $stylesheet = <<'++end_of_stylesheet';
      .emp_table {
    ...
                         
          $q->start_table({ -class => 'emp_table', 
                            -width => 450 });
    
  5. or download this
    -href=>"emp-list.cgi"
    
  6. or download this
    my $STYLESHEET_DIR = '/stylesheets';
    my $IMAGE_DIR      = '/images';
    
  7. or download this
    while (@_ = $sth->fetchrow_array()) {
       $emp_id = $_[0];
       $emp_name = $_[1];
       $dept = $_[2];
    
  8. or download this
    while (my ($emp_id, $emp_name, $dept) = $sth->fetchrow_array) 
    { ... }