|
|
Year Bug Fix in archive.php
- General Posted by mochaexpress (Friday February 16 2001 @ 03:33AM EST) views: 106 |
in ./archive.php:
change
$y = strftime("%y",$a["ts"]);
to
$y = strftime("%Y",$a["ts"]);
%y is 2 digit year without the century. this will fail for a query using the SQL function year() which expects a 4 digit year. so basically you'd get nothing displayed. change it to %Y (big Y) and you should see 4 digits displayed when viewing archive.php. and if you click on the link, it'll query the db properly:
http://www.minnesota.com/~tom/phpweblog/archive.php?month=02&year=2001
|
|
|
|
|