Help for this page

Select Code to Download


  1. or download this
    $sth = $dbh->prepare("select a, b, c from foo");
    $sth->execute;
    ...
        # $row->[1] is column 'b', 
        # etc...
    }
    
  2. or download this
    while(($one, $two, $three) = $sth->fetchrow_array) {
        # $one, $two and $three are columns a, b and c
    }