Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
hoz #1
Complex Structure
Hey guys,
I've created a reservation app that checks multiple dates against a calendar
and if the dates are available inserts them into a table. I want to create an
intermediate step like a container that holds in SESSION all dates until the
user submits a final confirmation, in which the multiple dates and times store
in a SESSION are inserted into the table. This sounds like a structure to me
unless I can do it a different way. Can you please tell me how I would go about
doing this? There could be anywhere from 1-20 dates, so it needs to be
unlimited.
<cfset eventStart = CreateDateTime(Year(queryDate), Month(queryDate),
Day(queryDate), Hour(form.time), Minute(form.time), Second(form.time))>
<cfset eventEnd = CreateDateTime(Year(queryDate), Month(queryDate),
Day(queryDate), Hour(form.endtime), Minute(form.endtime), Second(form.endtime))>
<cfset SESSION.finalList = StructNew()>
<cfloop list="#eventStart#" index="eventId">
<cfset SESSION.finalList.eventstart[#eventId#] = StructNew()>
<cfset SESSION.finalList.eventend[#eventId#] = StructNew()>
</cfloop>
If this is heading in the right direction, how would I take this and insert it
into the table.
Thanks,
Hoz
hoz Guest
-
Class::Struct - want to access structure within structure
I want to access a structure within a structure. Below is what I had in mind. Please help. #!/perl/bin/perl use Class::Struct; struct Step... -
Integrating complex XML structure
Hi, im trying to use XMLConnector and dataset to integrate an XML file. the structure of the xml file is the following : <members> <member>... -
Structure of complex distributions; CVS
I am working on a pretty complex distribution, and I could use some advice on how to structure its directories. This distribution contains... -
Arbitrarily Complex Data Structure
Hi. Is it possible to create a subroutine to handle an arbitrarily complex data structure (for my purposes, complex only refers to hashes and... -
Complex Site Structure - One project or many?
Hi All, We have developed a nice .Net platform for our growing internet (www.co.sutter.ca.us), intranet and internal web application sites.... -
mxstu #2
Re: Complex Structure
I would store the list of event dates in an array instead. Each element of the
array being a structure that would hold the "eventStart" and "eventEnd" date
pair. When the user is ready, you could cfloop through the event list array
(i.e. loop from 1 to the number of array elements) and get the "eventStart" and
"eventEnd" for the each element and insert those dates into your table. You
would of course need to verify that the dates were still available before
inserting them.
mxstu Guest



Reply With Quote

