Help for this page

Select Code to Download


  1. or download this
    my $found;
    while (@row = $query->fetchrow_array) {
    ...
    } else {
      # data was not found
    }
    
  2. or download this
    my $sql = "SELECT * FROM $course WHERE column = ?";
    my $sth = $dbh->prepare($sql);
    ...
    } else {
      # no such row found
    }