Forum Moderators: coopster
I was wondering how to write SELECT articles which are dated May 2004 from this table.
$sql = "SELECT id, article, dateline FROM articles ORDER BY dateline DESC LIMIT 3";
Thanks much!
[pre]
$begindate = mktime(0,0,0,5,1,2004);
$enddate = mktime(24,59,59,5,31,2004);
$sql = "SELECT id, article, dateline FROM articles
WHERE dateline > '".$begindate."' and dateline < '".$enddate."'
ORDER BY dateline DESC LIMIT 3";
[/pre]
print strftime [php.net]('%c', 961484400); // 06/20/00 02:00:00