[prev in list] [next in list] [prev in thread] [next in thread]
List: mysql
Subject: Re: Problem when use mont and from_unixtime.
From: Joseph Bueno <joseph.bueno () trader ! com>
Date: 2003-06-30 14:15:53
[Download RAW message or body]
condor@vereya.net wrote:
> Hello,
> i build one query in my mysql:
> mysql> select timestamp from lastauth where month(from_unixtime(timestamp) = 6);
> Empty set (0.00 sec)
> Query is empty, but:
> my timestamp table:
> +------------+
> | timestamp |
> +------------+
> | 1056981323 |
> +------------+
> 1 row in set (0.00 sec)
> mysql> select from_unixtime(1056981323);
> +---------------------------+
> | from_unixtime(1056981323) |
> +---------------------------+
> | 2003-06-30 16:55:23 |
> +---------------------------+
> 1 row in set (0.01 sec)
> and:
> mysql> select month(from_unixtime(1056981323));
> +----------------------------------+
> | month(from_unixtime(1056981323)) |
> +----------------------------------+
> | 6 |
> +----------------------------------+
> 1 row in set (0.00 sec)
>
> Any body know where is my mistake?
>
> Regards,
> Condor
>
>
> ___________________________________
> Vereya Cabel, http://www.vcable.net
>
>
>
Move the parenthesis:
select timestamp from lastauth where month(from_unixtime(timestamp))=6;
Regards,
Joseph Bueno
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=mysql@progressive-comp.com
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic