Subdomain Posts
Perl | 1 hour ago
Perl | 1 hour ago
Perl | 4 hours ago
Perl | 14 hours ago
Perl | 14 hours ago
Perl | 17 hours ago
Perl | 17 hours ago
Perl | 1 day ago
Perl | 1 day ago
Perl | 1 day ago
Recent Posts
None | 1 min ago
None | 1 min ago
None | 1 min ago
None | 2 min ago
None | 2 min ago
None | 2 min ago
None | 2 min ago
None | 2 min ago
None | 2 min ago
None | 2 min ago
Sitereport
Find cool info about any domain on the internet?
visit sitereport
Free Subdomains
Want a pastebin.com sub-domain for your community?
learn more...
What is pastebin?
Pastebin is a website that hosts all your text & code on dedicated servers for easy sharing.
learn more...
Learn a little bit about the new Pastebin.com on our help page. hide message
By Anonymous on the 29th of Jan 2010 09:19:31 PM Download | Raw | Embed | Report
  1. use DBI;
  2. use DBD::mysql;
  3.  
  4. #.........
  5. #.........
  6.  
  7. sub db_select {
  8.    my $dbh=shift;
  9.    my $sqlStr = shift;
  10.    my @list;
  11.    #my $dbh = get_dbh();
  12.    my $sth = $dbh->prepare($sqlStr);
  13.    $sth->execute() or return 0;
  14.    @list = $sth->fetchrow_array();
  15.    #$dbh->disconnect();
  16.    if ($#list == 0) {
  17.      return $list[0];
  18.    } else {
  19.      return @list;
  20.    }
  21. }
Submit a correction or amendment below. [ previous version ] | [ difference ] | Make A New Post
To highlight particular lines, prefix each line with @h@
Syntax highlighting:
Post expiration:
Post exposure:
Name / Title:
Email: