Re: Question on CURDATE()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



What's the exact error you're getting, I am able to do this:

SELECT curdate( ) AS one, curdate( ) AS two;

which results in this: 

 one  	 two
2005-09-13 	2005-09-13

No error, there is no limit to the number of times you can issue a date call 
according to the MySQL documentation.. well, it doesn't directly say that, 
but it doesn't say there's a limit either. 

Are you sure it isn't a syntax error? The example you sent is missing 
parenthesis in the last curdate call. This should work:

SELECT * FROM WEEKS WHERE BEGIN >= CURDATE() and END <= CURDATE();

Better, but I'm not sure if that's just a typo or not.

-Micah 
On Tuesday 13 September 2005 7:20 pm, reclmaples wrote:
> I am using mysql Ver 12.22 Distrib 4.0.16
>
> Sorry for not including that.
>
> Thanks
> -Rich
>
> -----Original Message-----
> From: Micah Stevens [mailto:micah@xxxxxxxxxxxxxxxxxx]
> Sent: Tuesday, September 13, 2005 9:13 PM
> To: php-db@xxxxxxxxxxxxx
> Subject: Re:  Question on CURDATE()
>
>
>
> What SQL server are you using?
>
> On Tuesday 13 September 2005 7:08 pm, reclmaples wrote:
> > I am trying to write a statement that will basically do this:
> >
> > SELECT * FROM WEEKS WHERE BEGIN >= CURDATE() and END <= CURDATE;
> >
> > But for some reason I can only use one CURDATE() reference in my sql
> > statement, does anyone know why?  Is there a way I can get around this?
> >
> >
> > Any help would be greatly appreciated.
> >
> > Thanks
> > -Rich
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux