Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Web Programming > Adobe Web Programming > Dreamweaver (all versions)
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Dreamweaver (all versions) section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old January 23rd, 2004, 03:57 PM
Registered User
 
Join Date: Jan 2004
Location: White Oak, Pa, USA.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to tkdk88 Send a message via MSN to tkdk88 Send a message via Yahoo to tkdk88
Default Trying to establish an ID variable


Hello,
     I'm trying to write the code for a website that I want to upload to a paid server for my new talent agency. I need to have a variable running on the server that sets my Talent ID# and keeps counting it just like autonumber in Microsoft Access. Do I have to cfset the variable or how can I do this so the variable doesn't reset to 0 everytime the page expires?

Respectfully submitted,
Larry V. Reitz, Jr.
Reply With Quote
  #2 (permalink)  
Old January 23rd, 2004, 05:24 PM
Imar's Avatar
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Hi there,

You may want to take a look at the following two articles. They describe a Hit Counter scenario, implemented in ASP. There are no Cold Fusion versions of these articles available, but these articles may give you enough ideas to implement a similar solution in CF.

http://Imar.Spaanjaars.Com/QuickDocID.aspx?QUICKDOC=227
http://Imar.Spaanjaars.Com/QuickDocID.aspx?QUICKDOC=238

Cheers,

Imar


---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Reply With Quote
  #3 (permalink)  
Old January 24th, 2004, 12:59 PM
Registered User
 
Join Date: Jan 2004
Location: White Oak, Pa, USA.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to tkdk88 Send a message via MSN to tkdk88 Send a message via Yahoo to tkdk88
Default

*** The problem is that I am a student and I have only had one class in Cold Fusion. I am taking 8 week classes which is not enough time to fully learn all this code. ***
Quote:
quote:Originally posted by Imar
 Hi there,

You may want to take a look at the following two articles. They describe a Hit Counter scenario, implemented in ASP. There are no Cold Fusion versions of these articles available, but these articles may give you enough ideas to implement a similar solution in CF.

http://Imar.Spaanjaars.Com/QuickDocID.aspx?QUICKDOC=227
http://Imar.Spaanjaars.Com/QuickDocID.aspx?QUICKDOC=238

Cheers,

Imar


---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Respectfully submitted,
Larry V. Reitz, Jr.
Reply With Quote
  #4 (permalink)  
Old January 25th, 2004, 07:31 AM
Imar's Avatar
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Well, I never said you should learn all that code; I said the articles could give you some ideas how to implement this in Cold Fusion.

Basically, the idea *is* the same: store a global number somewhere in memory and in a text file or database. Each time the number gets increased, you should also update the number in the file or database.

Alternatively (and more safe in your situation), have the database hand out an AutoNumber. For each new ID you need, insert a record in a specific table. Let the database assign a new ID for the record and use that ID as your ID. If you search Google, you'll find numerous examples of Cold Fusion code that uses a database.

Cheers,

Imar


---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
LoadFromSqlServer - Can't establish connection mungdrool BOOK: Professional SQL Server 2005 Integration Services ISBN: 0-7645-8435-9 0 March 8th, 2006 04:08 PM
Establish Com link to Webpage Mantis Pro VB 6 3 April 18th, 2005 04:14 AM
How to establish a sql server desktop engine pramos.21d SQL Server 2000 0 March 2nd, 2005 09:50 AM
Passing a variable into the id() function EstherMStrom XSLT 5 January 19th, 2005 02:32 PM
why not index.asp?id=1 can be www.myweb.com/?id=1 BurhanKhan Classic ASP Professional 11 September 6th, 2004 02:06 PM



All times are GMT -4. The time now is 05:27 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.