Section 6.1.6 of the Manual:

(http://www.mysql.com/documentation/mysql/bychapter/manual_Reference.htm
l#Reference)

WHEN is a reserved word.

HTH
Greg

> -----Original Message-----
> From: Jonathan Farrow [mailto:[EMAIL PROTECTED]]
> Sent: Monday, March 04, 2002 6:45 PM
> To: [EMAIL PROTECTED]
> Subject: mysql
> 
> 
> My web hosting company recently upgraded me to a new server running
> freeBSD. In the process, I find that the sql query that includes the
> following statement no longer works:
> 
> if (now()-when>2000000,'!','')
> 
> If, however, I add the name of the table "assigned" that contains the
> row "when" then it works:
> 
> if (now()-assigned.when>2000000,'!','')
> 
> The version of mysql in which the first statement worked is 3.22.25
> The new version of mysql in which the first statement did NOT work is:
> 3.23.26
> 
> Is this some quirk of the "if" statement in this particular version?
> Could it be that the row name "when" is illegal? It doesn't appear
> necessary to include the table name in other queries, except when the
> same row name appears in two tables referenced by the same query. Can
> anyone answer this?
> 
> Regards,
> --
> PLEASE QUOTE THE ORIGINAL MESSAGE IN ALL CORRESPONDENCE...
> We get a lot of email and it's often difficult to keep track!
> 
> Jonathan Farrow
> 
> Onartworks
> 170 South La Brea Avenue
> Los Angeles, CA  90036
> Phone: (323) 934-1500
> Fax: (323) 934-1835
> Web: http://www.FineArtSite.com/
> Web: http://www.onartworks.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
> 
> 

---------------------------------------------------------------------
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