Re: [PHP-DB] CURDATE()

2011-08-19 Thread who.cat
I tried on my db select count(*) from my_table where col_timestampcurdate(); the column col_timestamp type is timestamp,this sql works well. hope it helpful. All you best What we are struggling for ? The life or the life ? On Thu, Aug 18, 2011 at 5:21 PM, Geoff Lane

Re: [PHP-DB] CURDATE()

2011-08-18 Thread Geoff Lane
On Thursday, August 18, 2011, Ron Piggott wrote; What I tried below doesn’t work: ( CURDATE() . % ) Even though date values are presented like strings, they are dates/times. So you need to either cast CURDATE() to a string or else perform 'date arithmetic'. Check the manual for DATEDIFF(),

Re: [PHP-DB] CURDATE

2010-08-16 Thread kesavan trichy rengarajan
Try: DATE(date_accessed) = CURDATE(). Have a look at this: http://dev.mysql.com/doc/refman/5.1/en/date-and-time-functions.html#function_dateto understand what's happening. Regards, Kesavan. On 17/08/2010 6:26 AM, Ron Piggott ron.pigg...@actsministries.org wrote: I am wondering why: SELECT *

Re: [PHP-DB] CURDATE

2010-08-16 Thread Aleksei Sapunov
Hi all, I have a big question - why on this list raised question about MySQL or any other database without any relation to PHP? Is it list for solving SQL and DB problems? When I subscribe to this list I think that this list is about PHP DB problems. At least problems related to PHP - but not