Hi people,

I would like to select news from my database bases on week/year and
How can i do this.. I would like to pass two arguments in the query
string, like news.php?week=14&year=2003 or news.php?month=3&year=2003.
Can anybody help me.. Thanks in advance. I have been looking at the
date() and mktime() functions, but is there anyway to determine the date
from a weeknumber? I have been using this:

echo "base date: ".$yr."-".$mnth."-".$dy."<br />"; 
echo "last sunday: ".date("Y-m-d",
echo "next saturday: ".date("Y-m-d",
r />";

$sql = "SELECT * FROM news WHERE date>='$last_sunday' AND

But i would find it better to use a weeknumber instead

Best regards,

Davy Obdam - Networking4all
Webapplication developer
Web: http://www.networking4all.com 

Kijk ook eens op: http://www.verzamelgids.nl 

PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to