Dharma Mulya
|
| Posted: 02/04/2003, 10:11 PM |
|
Hi guys,
Can anybody help to show me how to populate Listbox with all the months in a
year for a search function?
I'm sure it can be done without creating a new table full of them and
joining them. Any suggestion?
Thank you in advance.
Dharma
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.445 / Virus Database: 250 - Release Date: 1/21/03
|
|
|
 |
Kasper Pedersen
|
| Posted: 02/05/2003, 12:44 AM |
|
Having a table called "Months" you can set the datasource like this (the
Month table should contain January -> December).
------------------------
SELECT
CONCAT(YEAR(CURDATE()),'-',MonthID) AS MonthID,
`MonthName`
FROM
months
------------------------
The output is
------------------------
....
<select name="ListBox1">
<option value="" selected>Vælg værdi</option>
<option value="2003-1" >January</option>
<option value="2003-2" >Febuary</option>
....
------------------------
I dont know which database you are using, but you should be to make some
minor changes and make it work.
Kasper
"Dharma Mulya" <dharma@supreme.com.my> wrote in message
news:b1q9tu$1vk$1@news.codecharge.com...
> Hi guys,
>
> Can anybody help to show me how to populate Listbox with all the months in
a
> year for a search function?
>
> I'm sure it can be done without creating a new table full of them and
> joining them. Any suggestion?
>
> Thank you in advance.
> Dharma
>
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.445 / Virus Database: 250 - Release Date: 1/21/03
>
>
|
|
|
 |
Dharma Mulya
|
| Posted: 02/05/2003, 3:43 AM |
|
I do not want to create a new table month that contain moths name Jan,
Feb...
Is it possible?
"Dharma Mulya" <dharma@supreme.com.my> wrote in message
news:b1q9tu$1vk$1@news.codecharge.com...
> Hi guys,
>
> Can anybody help to show me how to populate Listbox with all the months in
a
> year for a search function?
>
> I'm sure it can be done without creating a new table full of them and
> joining them. Any suggestion?
>
> Thank you in advance.
> Dharma
>
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.445 / Virus Database: 250 - Release Date: 1/21/03
>
>
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.449 / Virus Database: 251 - Release Date: 1/27/03
|
|
|
 |
DAVID
|
| Posted: 02/05/2003, 5:38 AM |
|
I have a better Idea for you:
check out http://www.mattkruse.com/javascript/calendarpopup/ in particular
Month-select calendar configuration.
|
|
|
 |
Dharma Mulya
|
| Posted: 02/05/2003, 9:21 PM |
|
Thanks David ..your solution works better. Thanks again.
Dharma
"DAVID" <codecharge_newsfeed@stridetech.com> wrote in message
news:b1r454$k7l$1@news.codecharge.com...
> I have a better Idea for you:
> check out http://www.mattkruse.com/javascript/calendarpopup/ in particular
> Month-select calendar configuration.
>
>
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.449 / Virus Database: 251 - Release Date: 1/27/03
|
|
|
 |