Help for this page

Select Code to Download


  1. or download this
    my $query = qw/INSERT INTO searches (search, engine, time) values (?,?
    +,NOW())/;
    $sth = $dbh->prepare($query);
    $sth->execute($search, $engine);
    
  2. or download this
    my $sth = $dbh->prepare (<<EOSQL);
    SELECT search, engine, DATE_FORMAT(time, "%W the %D of %M, at %r") as 
    +formatted_date from searches
    EOSQL
    $sth->execute;