Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^7: Making an automatic counter adder for all webpages

by polettix (Vicar)
on Dec 23, 2007 at 14:24 UTC ( [id://658775]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $db->do('UPDATE counters SET pagecounter = pagecounter + 1 WHERE pagen
    +ame = ?',
       undef, $pagename);
    
  2. or download this
    my $sth = $db->prepare(
       'UPDATE counters SET pagecounter = pagecounter + 1 WHERE pagename =
    + ?');
    $sth->execute($pagename);
    
  3. or download this
    my ($counter) = $db->selectrow_array('SELECT pagecounter FROM counters
    + WHERE pagename = ?', undef, $pagename);
    
  4. or download this
    sub increase_pagecount_for {
       my ($db, $pagename) = @_;
    ...
    
       return $counter;
    } ## end sub increase_pagecount_for
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://658775]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (2)
As of 2024-07-23 05:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.