I create a new game and insert it into my Oracle database. From
there I want to have the game ID and put it into a cookie. I've used
NEXTVAL AND CURVAL for inserting the value into the db, but not for
any external use, like my insert into a cookie. I guess I can do a
CFLock and then do a query after the insert for the last inserted
item, but is that the best way?
Here's the insert:
<CFQUERY NAME="add_item" DATASOURCE="esmart">
INSERT INTO fsnep_food_store_game_info
(
gi_id,login_id,
date_added,date_modified,
grocery_list,budget,
month,num_people,
num_weeks
)
VALUES
(
unique_food_store_game_info_s.NEXTVAL,#cookie.fsnep_login#,
SYSDATE,SYSDATE,
<cfqueryparam value="#form.g_list#"
cfsqltype="cf_sql_varchar">,<cfqueryparam value="#form.budget#"
cfsqltype="cf_sql_varchar">,
<cfqueryparam value="#form.the_month#"
cfsqltype="cf_sql_varchar">,<cfqueryparam
value="#form.the_num_people#" cfsqltype="cf_sql_varchar">,
<cfqueryparam value="#form.the_weeks#" cfsqltype="cf_sql_varchar">
<!--- <cfcookie name="fsnep_bargain_hunt_gi_id"
value="#unique_food_store_game_info_s.CURVAL#"> --->
)
</CFQUERY>
thanks for any help.
--
Daniel Kessler
Department of Public and Community Health
University of Maryland
Suite 2387 Valley Drive
College Park, MD 20742-2611
301-405-2545 Phone
www.phi.umd.edu
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking
application. Start tracking and documenting hours spent on a project or with a
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:211529
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54