it also appears that you're checking for the same thing
over and over and over
'0' is the same as "0"
and 00000000000000 is the same as 0
and "00000000000000" is the same as '00000000000000'
try checking for either 0 or "0000-00-00"
> -----Original Message-----
> From: Tim [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, August 02, 2001 12:23 PM
> To: Jack Sasportas
> Cc: php
> Subject: Re: [PHP] How to Compare dates?
>
>
> To my eyeballs, it looks like you have too many closing parenthesis on
> all of those examples.
>
> - Tim
>
> On 02 Aug 2001 12:08:22 -0400, Jack Sasportas wrote:
> > OK I actually tried several things prior to the post, here are some of them and
> > the errors
> >
> > if ( ( mysql_result($db_result,$db_record,'order_date')==0) ) ) {
> > if ( ( mysql_result($db_result,$db_record,'order_date')=="0") ) ) {
> > if ( ( mysql_result($db_result,$db_record,'order_date')=='0') ) ) {
> > -or-
> > if ( ( mysql_result($db_result,$db_record,'order_date')=="00000000000000") ) )
> > {
> > if ( ( mysql_result($db_result,$db_record,'order_date')==00000000000000) ) ) {
> > -or-
> > if ( (
> > mysql_result($db_result,$db_record,'order_date')==strtotime("00000000000000")) )
> > ) {
> >
> > Parse error is the result in all these attempts...with quotes, single or double,
> > no quotes, zero or multiple zeros...by the way the timestamp returns all those
> > zeros so I was being specific....
> >
> > Any ideas ?
> >
> > Thanks !
> >
> >
> >
> >
> >
> > "Johnson, Kirk" wrote:
> >
> > > > Can someone tell me how to properly compare the value
> > > > returned from the
> > > > db to see if it is blank ?
> > >
> > > > if ( (
> > > > mysql_result($db_result,$db_record,'order_date')=00000000000000)
> > > > ) ) {
> > >
> > > Two things, Jack. Enclose 00000000000000 in quotes, since it is a string,
> > > but more importantly, use '==' instead of '=' for comparison. I hate it when
> > > I do that :)
> > >
> > > Kirk
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> > --
> > ___________________________________________________________
> > Jack Sasportas
> > Innovative Internet Solutions
> > Phone 305.665.2500
> > Fax 305.665.2551
> > www.innovativeinternet.com
> > www.web56.net
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]