-
December 20th, 2010, 08:48 AM
#1
SQL to Coldfusion
Hello Everyone,
I'm trying to write this statement using coldfusion:
Select * from TableName where ColumnName >= ‘1/1/2005’ and ColumnName < '1/1/2006'
In my database is a column, set to "Float" names year. All it has is a 4 digit year. I'm trying to build a dropdown with only certain years listed.
Thanks Everyone!
Aaron
-
December 20th, 2010, 09:18 AM
#2
Aaron,
You can use code similar to what is below
<CFQUERY NAME="YourQueryName" DATASOURCE="YourDSNName">
SELECT * FROM TableNAme
</CFQUERY>
<FORM METHOD="POST" ACTION="CFPage.cfm">
<SELECT NAME="Name">
<OPTION>Select an item</OPTION>
<CFOUTPUT QUERY="list">
<OPTION VALUE="#YourInformation#">#YourInformation#</OPTION>
</CFOUTPUT>
</SELECT>
<INPUT TYPE="submit" VALUE="Submit Fruit">
</FORM>
If you have any further questions regarding this or need additional support please submit a ticket at "support.hostek.com".
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules