Help for this page

Select Code to Download


  1. or download this
    use POSIX qw(strftime);
    my $now_string = strftime "%Y-%m-%d %H:%M:%S", localtime;
    
    ...
    my $sth = $dbh->prepare("INSERT INTO users values('test', 'test', 1, 1
    +, 1, 1, ?)");
    $sth->execute($now_string);
    $dbh->disconnect();