Help for this page

Select Code to Download


  1. or download this
        $sqlCount = "SELECT COUNT(*) FROM $user_data_db_name WHERE USER_NA
    +ME='$form_values{'USER_NAME'}'";
        $sth = $dbh->prepare($sqlCount) || die "Cannot prepare: " . $dbh->
    +errstr();
        $sth->execute() or die "Cannot execute: " . $sth->errstr();
        my $occurences = $sth->fetchrow_arrayref->[0];
    
  2. or download this
        $sqlCount = "SELECT * FROM $user_data_db_name WHERE USER_NAME='$fo
    +rm_values{'USER_NAME'}'";
        $sth = $dbh->prepare($sqlCount) || die "Cannot prepare: " . $dbh->
    +errstr();
    ...
        while (@data = $sth->fetchrow_array()) {
            $ocurrences++;
        }