Go Back   CodingForums.com > :: Server side development > Other server side languages/ issues > ColdFusion

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 08-15-2011, 05:59 PM   PM User | #1
Kryptor2k
New to the CF scene

 
Join Date: Aug 2011
Location: UK
Posts: 3
Thanks: 1
Thanked 0 Times in 0 Posts
Kryptor2k is an unknown quantity at this point
Question Moving to next record after specified time

Hey all,

I'm looking for a way in ColdFusion of calling a query that will pull data based on category criteria entered, ie employment.

When the results come back I want to be able to show the result of 1 record and then get the query to progress to the next one after 30 seconds.

Would this be possible to do in CF?

Eagerly awaiting an answer whether good or bad

Dave
Kryptor2k is offline   Reply With Quote
Old 08-17-2011, 09:32 PM   PM User | #2
Gjslick
Regular Coder

 
Join Date: Feb 2009
Location: NJ, USA
Posts: 476
Thanks: 2
Thanked 70 Times in 69 Posts
Gjslick will become famous soon enough
One option is to refresh the webpage every 30 seconds (using JavaScript or a meta refresh tag), which would fetch the next record. You'd probably have to add a url query parameter to tell the server the next record to retrieve.

Otherwise, using AJAX to pull in a new result and updating the page would be best.
Gjslick is offline   Reply With Quote
Users who have thanked Gjslick for this post:
Kryptor2k (08-22-2011)
Old 08-18-2011, 06:26 PM   PM User | #3
Kryptor2k
New to the CF scene

 
Join Date: Aug 2011
Location: UK
Posts: 3
Thanks: 1
Thanked 0 Times in 0 Posts
Kryptor2k is an unknown quantity at this point
Gjslick,

Thanks for the reply. The autorefresh moving to the next query results is one I was looking at myself.

I'm not too sure on the AJAX thing. Is there any recommended reading on sites that will make that sound any easier since I've never really used it before?

Thanks
Dave.
Kryptor2k is offline   Reply With Quote
Old 08-22-2011, 06:53 PM   PM User | #4
Kryptor2k
New to the CF scene

 
Join Date: Aug 2011
Location: UK
Posts: 3
Thanks: 1
Thanked 0 Times in 0 Posts
Kryptor2k is an unknown quantity at this point
Ok,

With regards to using the Meta-Refresh tag.

I have a URL.Variable setup to pick on the ID field of the database. How do I now get CF to move to the next record in the query using the meta refresh?

Any help is greatly appreciated at this moment in time

Thanks to anyone who can give me some light on this one in advance =)

Dave
Kryptor2k is offline   Reply With Quote
Old 08-23-2011, 04:41 PM   PM User | #5
Gjslick
Regular Coder

 
Join Date: Feb 2009
Location: NJ, USA
Posts: 476
Thanks: 2
Thanked 70 Times in 69 Posts
Gjslick will become famous soon enough
You have to now query the next record. There is no "moving" per se.

Code:
<cfquery name="myQuery" datasource="myDataSource">
  SELECT myField FROM myTable
  WHERE ID = #url.myIdParam#
</cfquery>
Gjslick is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 06:20 AM.


Advertisement
Log in to turn off these ads.