At 2:13 PM -0400 7/5/1999, toxalot@stripped wrote:
>Does MySQL have a function to get the current date?
Yes, it's called CURRENT_DATE. :-) NOW() gives you current date and time.
>
>I want to find the current date and compare it to the users subscription
>expiry date to detemine if he still has access.
>
>I am working in perl DBI and I could get the date from the server using
>localtime or something, but it would be nice to just say
>
>SELECT * FROM tbl_name WHERE expiry_date > current_date
>
>Without having to properly format localtime first.
Is the server in a different timezone than the client?
>
>If you could give me proper syntax in perl DBI, it would be greatly
>appreciated
It has nothing to do with DBI syntax; you're using DBI to send SQL
statements that have the same format as they would have were you using
the mysql client (except that you don't add semicolons to your statements).
--
Paul DuBois, paul@stripped
Northern League Chronicles: http://www.snake.net/nl/