It's not my perl code, that error comes from webmin when I try to run that
query. It's okay though, I have solved the problem, I'm just saving the date
and the time separately now and it all works great. Thank you for the help
(C:
From: Daniel Rosher [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: Curtis Gordon [EMAIL PROTECTED]
Subject: RE: DAYOFYEAR()
Date: Mon, 14 Jan 2002 16:36:07 +1300
Curtis,
This is not a mysql issue ('Error - Perl execution failed')
works fine for me:
my $hashref = $dbh-selectall_hashref(END_SQL);
select DAYOFYEAR('2002-01-14 11:08:40')
END_SQL
printing with Data::Dumper produces
$VAR1 = [
{
'DAYOFYEAR(\'2002-01-14 11:08:40\')' = '14'
}
];
as expected.
Something is wrong with your perl code.
Regards,
Dan
-Original Message-
From: Curtis Gordon [mailto:[EMAIL PROTECTED]]
Sent: Monday, 14 January 2002 4:24 p.m.
To: [EMAIL PROTECTED]
Subject: DAYOFYEAR()
Hi! I'm storing a date in this format :
2002-01-13 11:08:40
-mm-dd hh:mm:ss
This is great because it gives me the date and the time, which I need.
I want to compare this date from the database to the current DAYOFYEAR()
but when I do this
select DAYOFYEAR('2002-01-13 11:08:40')
I get this
Error - Perl execution failed
Modification of non-creatable array value attempted, subscript -1 at
./mysql-lib.pl line 187, line 2.
It works great when I do select DAYOFYEAR(NOW()) though, I'm totally
confused, is this a known bug or is there a work around that
anybody knows
of that you can let me in on?
Ulitmately I want to compare todays DAYOFYEAR to the DAYOFYEAR
from fields
in the database to establish entries that were created today.
I'm looking at what I have written here and I think I have
confused myself,
if this is not clear, please feel free to flame me.
I'm looking forward to any light that can be shed on this problem.
_
Join the worlds largest e-mail service with MSN Hotmail.
http://www.hotmail.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
_
Chat with friends online, try MSN Messenger: http://messenger.msn.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