mysql + $_GET
| From: | Sebastian | Date: | Tue, 08 Apr 2003 04:04:24 +0000 |
| Subject: | mysql + $_GET | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-142791@lists.php.net to get a copy of this message | ||
hello, i am a little confused with this:
I have a URL that looks like this: month=April&year=2003
in mysql the time stamp is unix format, and i want to select rows based on
the URL.
$time = time();
if($_GET[year]) {
$year = date(Y, $time);
}
if($_GET_VARS[month]) {
$month = date(F, $time);
}
mysql_query("SELECT * FROM news WHERE time = '???'");
How do I go about this, since there are two variables, $year and $month from
the $_GET
cheers,
- Sebastian