# I use DBI; # and use DBD::Sybase; # almost daily. # And I never forget to use strict; # to scope my $variables; # carefully. my $server = 'is located some where'; my $database = 'has gigabytes of data here and there'; # Please give me my $database_handle = # and I want to connect successfully with DBI->connect("dbi:Sybase:server=$server;database=$database", "without", "any_trouble") or # my script will die "but not before I throw some warnings"; # Then I search for my $data = # in the $database_handle-> # I first prepare("-- my SQL with a SELECT * FROM data WHERE -- I limit the data set size = 'to something not too large'"); # Then I retrieve my $data-> # after I execute(); # the query # And let me loop through the result while # I still have something to worry # I have (my @results = $data->fetchrow()) { # but I want to throw them away } # When I have gone through all the $data-> # and I want to finish; # I close the $database_handle-> # with disconnect; # and go sip a cup of tea.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: After a long day of database programming at work (my first perl poem :-)
by zentara (Cardinal) on Nov 17, 2003 at 17:49 UTC | |
by ZdrozZ (Scribe) on Nov 24, 2003 at 16:22 UTC | |
|
Re: After a long day of database programming at work (my first perl poem :-)
by jZed (Prior) on Nov 18, 2003 at 01:10 UTC |