|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Drop Down list
Hi,
I am trying to pull out a date field from Access 97 to be in a drop downlist using Php and ODBC. Could anyone help me out? The query is SELECT DISTINCT format(mid(Time, 2, 11), 'dd/mmm/yyyy') FROM IPlog WHERE TIME<>''"; IPlog ----------------------------- Time [09/Dec/2003:17:42:56 [10/Dec/2003:17:42:56 [11/Dec/2003:17:42:57 [11/Dec/2003:17:42:57 |
|
#2
|
|||
|
|||
|
By the way this is a start. Do help me out in the centre part!
<form method="post" action="ConnectDB.php"> <select name="Datelist"> <option> <?php $connectionstring = odbc_connect("onlinebookingODBC", "", ""); -------- odbc_close($connectionstring); ?> </select> </form> |
|
#3
|
||||
|
||||
|
Try this:
select format(day(cdate(mid(Time, 2, 11))) & "/" & month(cdate(mid(Time, 2, 11))) & "/" & year(cdate(mid(Time, 2, 11))),"dd/mmm/yyyy") from IPLog where Time is not null
__________________
BRegs, TBÁrpi "I can only show you the door. You're the one who has to walk through it." |
|
#4
|
|||
|
|||
|
hmm...thanks
But perhaps u misunderstand my question. I would like a dropdown list that display the contents. |
|
#5
|
||||
|
||||
|
Probably.
I thought you had the problem with the SQL statement sent to Access. If this is in Access then set the RowSource property of the combo box to the SQL statement I posted. If it's in other language then I recommend to post the call to other forums. |
![]() |
| Viewing: ASP Free Forums > Database > Microsoft Access Help > Drop Down list |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|