I am trying to get my program to be searchable by
date, but it doesn't work.  I get an error message in
perl, that follows the code I included.  Any
suggestions are greatly appreciated.

PERL
----------
@currenttime= localtime();

$y= $currenttime [5] + 1900;

$m= $currenttime [4];
$dom= $currenttime [3];

$ydoy= $y*1000 + $m + $dom;
print $ydoy;

my $dbh= DBI->connect ('DBI:mysqlPP:myd:localhost',
'pass', 'pass') ||die "Could not connect to database:
".DBI->errstr;
my $sth = $dbh->prepare("SELECT * from food WHERE
end_date > $ydoy");
$sth->execute($ydoy);

while((end_date > $ydoy) = $sth->fetchrow_array)
{
print "$start_date\n, $end_date\n, $event\n, $id";
}

die $sth->errstr if $sth->err;


$sth->finish();
$dbh->disconnect();

ERROR MESSAGE:
--------------

can't modify generic gt()) in list assignment at line
31 (which is the fetchrow_array line)
repeated HERE:
while((end_date > $ydoy) = $sth->fetchrow_array)
{
print "$start_date\n, $end_date\n, $event\n, $id";
}


Thanks again for your help.

Melissa Stranzl

917-922-7872

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to