It worked, thanks alot!
on 4/18/02 1:43 PM, Paul Edmondson at [EMAIL PROTECTED] wrote:


Your column called 'when' is a reserved word.
Thats my first guess at your problem. I've come across this before with
MySQL accepting column names that are reserved words. Try changing the
column name to something else and try again.

On Thu, 2002-04-18 at 18:34, Leif K-Brooks wrote:
> I have a field in one of my tables called when, which is type timestamp.
> I'm trying to use some of the date functions to get data from it, but it's
> not working.  The return from mysql_error() is not helpful.  Any ideas?
> Here's my query:
> $query = mysql_query("select month(when) as month,year(when) as
> year,dayofmonth(when) as day,hour(when) as hour,minute(when) as
> minute,second(when) as second from table") or print "Error: ".mysql_error();
> -- 
> PHP Database Mailing List (
> To unsubscribe, visit:

Reply via email to