Help for this page

Select Code to Download


  1. or download this
    $SQL='update tbl set val=? where id=?';
    my $ST = $DB->prepare($SQL);
    ...
       if ($r->[1] > 100) {$ST->execute(100, $r->[0])}
       elsif ($r->[1]<0)  {$ST->execute(0, $r->[0])}
    }
    
  2. or download this
    $DB->do("update tbl set val=100 where val>100");
    $DB->do("update tbl set val=0 where val<0");