Bobby,

So basically what I would do is add a column to my advertisements table
(bit) and lose the temporary table. I suppose I would just run a scheduled
task once a week and delete the ads where verified flag is 0 and the
insertDate is older than a week. Does this sound about right. I still need
to get the next available Id from that table though and be able to guarantee
it's availability upon final ad insertion. What will handle that? There is
other things in the app that need the ID prior to insert IE: folder and
image naming etc...




Doug




----- Original Message ----- 
From: "Bobby Hartsfield" <[EMAIL PROTECTED]>
To: "CF-Talk" <cf-talk@houseoffusion.com>
Sent: Thursday, December 07, 2006 7:28 AM
Subject: RE: SQL getting the next available ID


> Entering it temporarily will ensure that it isn't used again... ever
>
> Also, a simple flag like 'verified' as a bit field would make it easier
than
> having 2 separate tables for verified and unverified ads.
>
> Enter all of the info and set the verified flag to 0. Once the user
verifies
> it, you can set the flag to 1. All 1's are verified ads that are ready to
> roll. All 0's are pending verification.
>
>
> ..:.:.:.:.:.:.:.:.:.:.:.
> Bobby Hartsfield
> http://acoderslife.com
>
>
>
>
>
> -----Original Message-----
> From: Doug Brown [mailto:[EMAIL PROTECTED]
> Sent: Thursday, December 07, 2006 9:21 AM
> To: CF-Talk
> Subject: SQL getting the next available ID
>
> I am needing to get the next available ID from my
(permanent)advertisements
> table and be able to hang onto it until a user checks out and I do a final
> insert. What happens is the user does the following things.
>
> 1. User clicks on (Create advertisement) link and that is when I need to
get
> the new ID for insert from the final ads table.
>
> 2. User creates ad and it is placed into a temporary ads table until
> checkout is complete. I need to place this (ID) into this table
temporarily.
>
> 3. Once user completes checkout and I receive back verification, I will be
> quering the temp table and inserting the results into the final ads table.
>
>
> I am wondering how I can go about this while guaranteeing that the ID
> selected will not get used by another user during this process. I think
> there was another post touching on the subject earlier, but I think it was
a
> little different scenario.
>
>
>
>
>
> Any help is appreciated.
>
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Create robust enterprise, web RIAs.
Upgrade & integrate Adobe Coldfusion MX7 with Flex 2
http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:263125
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to