Ask a Question related to Coldfusion Database Access, Design and Development.
-
T McDizzle #1
Dynamic to static
Is there a way for me to take a table that is being built dynamically and have
it be stored as static information in memory somehow so that I can sort it in
anyway that I want. Due to various complications (read my other post to know
more), after many many hours and dozens of attempts at getting the table to
sort the way I want it to in the queries, I cannot. I basically want to store
the information in the dynamic table that is being built so that I can sort by
any of the columns that I would like. Any ideas would be appreciated.
T McDizzle Guest
-
Dynamic and Static Site
I have not used Dreamweaver before and now I am also trying to add dynamic pages to our site. I will be using ColdFusion to do this. The question... -
Static vs. Dynamic XML
Hello all, I have been stumped on this one for over a year now. I have created a Flash Map that functions properly with a static XML file but... -
Converting Static to Dynamic -
Hey Y'all, I just launched a new website a couple of days ago - http://www.v4honda.com It is the perfect example of why a site should be dynamic.... -
Static vs. Dynamic
What is the overall difference between static html and dynamic html? -
Dynamic and Static IP
I was wondering if you can have dynamic and static IP addresses on the same network. The network will include PCs with Win98, W2K, and XP operating... -
Ian Skinner #2
Re: Dynamic to static
Are you referring to a record set? If so, then you just assign the
record set to a persistent scope such as session, application or server:
session.myRecordSet for example. This does require some code to turn on
some of these sessions, but it is well documented.
Or are you referring to an actually html table being built from your
data? In this case the <cfsavecontent variable="foobar"></cfsavcontent>
will do what you want, just wrap the generated output on these tags and
it is saved to the variable given in the variable parameter.
HTH
Ian Skinner
T McDizzle wrote:> Is there a way for me to take a table that is being built dynamically and have
> it be stored as static information in memory somehow so that I can sort it in
> anyway that I want. Due to various complications (read my other post to know
> more), after many many hours and dozens of attempts at getting the table to
> sort the way I want it to in the queries, I cannot. I basically want to store
> the information in the dynamic table that is being built so that I can sort by
> any of the columns that I would like. Any ideas would be appreciated.
>Ian Skinner Guest
-
T McDizzle #3
Re: Dynamic to static
It is an actual HTML table being built from data, and while the <cfsavecontent>
tag would store the data , I don't think it would allow me to sort that data.
If it can, please let me know how. If not, I'll probably need more
recommendations. Thanks though.
T McDizzle Guest
-
Ian Skinner #4
Re: Dynamic to static
Nothing is going to make a basic HTML table sortable. If you need that
you are going to be looking at things like DHTML code to include
javascript to sort the table (or AJAX to take this to the next level),
or for <cfform> datagrid type controls (or flex to take that to the next
level).
But, my first approach would probably be to store the record set data
that builds the table, sort this as needed then rebuild the HTML.
T McDizzle wrote:> It is an actual HTML table being built from data, and while the <cfsavecontent>
> tag would store the data , I don't think it would allow me to sort that data.
> If it can, please let me know how. If not, I'll probably need more
> recommendations. Thanks though.
>Ian Skinner Guest
-
paross1 #5
Re: Dynamic to static
You could display your output in a CFGRID, then you could sort by any column at will
Phil
paross1 Guest
-
JaredJBlackburn #6
Re: Dynamic to static
I've had good luck doing what Ian said - storing the query in the session
scope. Then I can use query of queries to sort the data using a simple order
by clause and without having to go back to the database on each pageload. To
rebuild the table, I loop through the reordered query.
This does assume that your data is relatively static because you're not
getting any updates from the database on your resorts.
JaredJBlackburn Guest
-
T McDizzle #7
Re: Dynamic to static
I have 2 main questions at this point:
1.) Is there a way to create a CFGrid with two queries and then sort the
entire table based on one query?
2.) How exactly do I go about doing this with a session or recordset, whatever
the case may be, to get it to sort properly?
The more input the better. Thanks to everyone for helping thus far.
T McDizzle Guest
-
paross1 #8
Re: Dynamic to static
Combine and sort your two queries in a Q-of-Q, then use it to drive your CFGRID.
Phil
paross1 Guest
-
SSandlin #9
Re: Dynamic to static
simple problem, simple solution!
use one page to select your sort oder column selection.
use result page to set session variable for column name, the use if/else
statements to qury database by selection.
Do it all the time, works well.
SSandlin Guest



Reply With Quote

