Re: mysql + $_GET
| From: | Sebastian | Date: | Tue, 08 Apr 2003 04:32:07 +0000 |
| Subject: | Re: mysql + $_GET | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-142797@lists.php.net to get a copy of this message | ||
no, i think you misunderstood. I am trying to fetch rows from mysql based on
the month/year from $_GET
cheers,
- Sebastian
----- Original Message -----
From: "Tim Nagel" <tim@merkworx.com>
| What you have there, is a bit strange. Your testing to see if a variable
is
| set, and just go ahead and set the current year and month?
|
| ($time = time();)
|
| -Tim
| ----- Original Message -----
| From: "Sebastian" <sebastian@dslr.net>
| To: "php list" <php-general@lists.php.net>
| Sent: Tuesday, April 08, 2003 2:04 PM
| Subject: [PHP] mysql + $_GET
|
|
| > 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
| >
| >
| >
|