Microsoft Access Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsDatabaseMicrosoft Access Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old December 10th, 2003, 03:39 AM
hek78 hek78 is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 5 hek78 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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

Reply With Quote
  #2  
Old December 10th, 2003, 03:45 AM
hek78 hek78 is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 5 hek78 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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>

Reply With Quote
  #3  
Old December 11th, 2003, 07:02 PM
TBÁrpi's Avatar
TBÁrpi TBÁrpi is offline
Lazy User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Location: Hungary, Europe
Posts: 337 TBÁrpi User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 13 h 5 m 5 sec
Reputation Power: 5
Send a message via MSN to TBÁrpi Send a message via Yahoo to TBÁrpi Send a message via Skype to TBÁrpi
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."

Reply With Quote
  #4  
Old December 11th, 2003, 07:09 PM
hek78 hek78 is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 5 hek78 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
hmm...thanks
But perhaps u misunderstand my question. I would like a dropdown list that display the contents.

Reply With Quote
  #5  
Old December 11th, 2003, 07:20 PM
TBÁrpi's Avatar
TBÁrpi TBÁrpi is offline
Lazy User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Location: Hungary, Europe
Posts: 337 TBÁrpi User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 13 h 5 m 5 sec
Reputation Power: 5
Send a message via MSN to TBÁrpi Send a message via Yahoo to TBÁrpi Send a message via Skype to TBÁrpi
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.

Reply With Quote
Reply

Viewing: ASP Free ForumsDatabaseMicrosoft Access Help > Drop Down list


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
Stay green...Green IT