hey guys,
Im having one difficulties, here how I want it to go...
Assuming my table consist of column
DATE|DATA 1| DATA 2| DATA 3|
and im having such data like
DATE |DATA 1 | DATA 2| DATA 3|
01/12/08| 4 | 4 | 3 |
02/12/08| 6 | 6 | 6 |
03/12/08| 8 | 2 | 7 |
04/12/08| 1 | 2 | 3 |
I would like to make a page that could retrieve data from choice date 1 to choice date 2, like this,
--------------------------------------------------------
View Data From [ drop down menu] to [drop down menu]
--------------------------------------------------------
*whereby the [drop down menu] is the choices of date available
is there a code that could do such function ? whereby the user just choose the interval date, then the code will display all the data between the interval..
anyone got any idea?
thanks!
azhan
retrieving array of choices...how?
Moderator: General Moderators
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Re: retrieving array of choices...how?
You can do either:
"SELECT * FROM mytable WHERE `date` between $value1 and $value2"
or
"SELECT * FROM mytable WHERE `date` >= $value1 and `date` <= $value2"
"SELECT * FROM mytable WHERE `date` between $value1 and $value2"
or
"SELECT * FROM mytable WHERE `date` >= $value1 and `date` <= $value2"
(#10850)
Re: retrieving array of choices...how?
Ooooo..thanks arborint....I'll try and i;ll let u know whether it works or not... 