Fetching problem between months and year

Codes here !

Moderators: macek, egami, gesf

Post Reply
johnj
php-forum Super User
php-forum Super User
Posts: 1805
Joined: Thu Mar 10, 2011 5:07 pm

Re: Fetching problem between months and year

Post by johnj » Fri Aug 24, 2012 7:55 am

The definition for time() is " Returns the current time measured in the number of seconds since the Unix Epoch (January 1 1970 00:00:00 GMT)".

Are you sure that added_date is a value returned by time?. I think added_date is a timestamp value returned by strtotime().

johnj
php-forum Super User
php-forum Super User
Posts: 1805
Joined: Thu Mar 10, 2011 5:07 pm

Re: Fetching problem between months and year

Post by johnj » Tue Aug 28, 2012 8:06 am

date() is a php builtin function. You need to use the mysql date function if you want to use it within a sql. Please read the mysql manual.

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 1 guest