First, I think you might consider that the database schema you have here is not very good. You're going to have a separate database table for every course? Why would you do this? A much better option would be to have a table of courses, with course IDs, and another table with times and dates that link to a course via a foreign key. If any of this sounds unfamiliar to you I'd urge you to stop right now and read a book or some web tutorials on SQL and database design, because not only is the critical knowledge to have as a developer, it is critical to creating a maintainable database structure for this application.
On 8/9/07, Zach Firestone <[EMAIL PROTECTED]> wrote: > > Hey, > > I am trying to output a dynamic variable within a ColdFusion query and > have hit a wall. I'm creating a golf package website that dynamically pulls > course names, tee times, and the cost of tee times. In a form on the > previous page they select the tee time, course they want to play, and date > they want to play. All these are pulled from a database. Here is my query: > > > <cfset Time1 = Form.TeeTime1> > <cfset Course1 = Form.Course1> > <cfset Date1 = #DateFormat(CreateODBCDate(Form.Date1), "yyyy-mm-dd")#> > <cfquery datasource="usagolf" name="Rate1"> > SELECT #Time1# FROM #Course1# WHERE Date = '#Date1#' > </cfquery> > > So the problem I'm having is outputting the price for that time from the > above query. This is what I would have to do do have it display right: > > <cfoutput>#Rate1.#Time1##</cfoutput> > > But ColdFusion throws an error when I do that because it's improper > syntax. I was hoping someone knew of another way I could call the output > from the above query. Any insight would be much appreciated. > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Get the answers you are looking for on the ColdFusion Labs Forum direct from active programmers and developers. http://www.adobe.com/cfusion/webforums/forum/categories.cfm?forumid-72&catid=648 Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:285894 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

