Heya Gang -
I went to the site in my previous post, but i dont quite understand how this works. I need to extract a certain month and year. this is the code i am using:
my $dsn = "DBI:mysqlPP:tt_open:$DB::SERVER";
my $dbh = DBI->connect($dsn, $DB::USER, $DB:ASS);
my $sth = $dbh->prepare(qq{ SELECT number FROM open WHERE createby = '$STAFF::NAMES[$counter01]' and extract(month from createdate) = '$SELECT::MONTH' and extract(year from createdate) = 2003 });
$sth->execute();
while (($TT::NUMBER) = $sth->fetchrow_array())
{ $STAFF::OPEN = $STAFF::OPEN + 1; $TOTAL::OPEN = $TOTAL::OPEN + 1; }
$sth->finish();
$dbh->disconnect();
I'd prefer if you didnt give me code, but maybe point me somewhere, where there is a better description of how to do what i need..... that way i can get a better grasp on how MySQL does the select function.
Thanks in advanced.
- Scott
I went to the site in my previous post, but i dont quite understand how this works. I need to extract a certain month and year. this is the code i am using:
my $dsn = "DBI:mysqlPP:tt_open:$DB::SERVER";
my $dbh = DBI->connect($dsn, $DB::USER, $DB:ASS);
my $sth = $dbh->prepare(qq{ SELECT number FROM open WHERE createby = '$STAFF::NAMES[$counter01]' and extract(month from createdate) = '$SELECT::MONTH' and extract(year from createdate) = 2003 });
$sth->execute();
while (($TT::NUMBER) = $sth->fetchrow_array())
{ $STAFF::OPEN = $STAFF::OPEN + 1; $TOTAL::OPEN = $TOTAL::OPEN + 1; }
$sth->finish();
$dbh->disconnect();
I'd prefer if you didnt give me code, but maybe point me somewhere, where there is a better description of how to do what i need..... that way i can get a better grasp on how MySQL does the select function.
Thanks in advanced.
- Scott