Updating two fields
Hi, I need to update two fields in my database. For example, I have two fields called data1 and data2. THe below code updates only data1 field. Whats the correct syntax to also update data2 field at the same time? cfquery name=Update datasource=db dbtype=ODBC UPDATE tblField SET data1='Yes' WHERE strUsername='test' /cfquery --- Colonel Nathan R. Jessop Commanding Officer Marine Ground Forces Guatanamo Bay, Cuba --- ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting.
RE: Updating two fields
here ya go. cfquery name=Update datasource=db dbtype=ODBC UPDATE tblField SET data1='Yes', data2='something' WHERE strUsername='test' /cfquery :) ..tony Tony Weeg Senior Web Developer UnCertified Advanced ColdFusion Developer Information System Design Navtrak, Inc. Mobile workforce monitoring, mapping reporting www.navtrak.net 410.548.2337 -Original Message- From: FlashGuy [mailto:[EMAIL PROTECTED]] Sent: Monday, December 09, 2002 9:22 AM To: CF-Talk Subject: Updating two fields Hi, I need to update two fields in my database. For example, I have two fields called data1 and data2. THe below code updates only data1 field. Whats the correct syntax to also update data2 field at the same time? cfquery name=Update datasource=db dbtype=ODBC UPDATE tblField SET data1='Yes' WHERE strUsername='test' /cfquery --- Colonel Nathan R. Jessop Commanding Officer Marine Ground Forces Guatanamo Bay, Cuba --- ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com
RE: Updating two fields
cfquery name=Update datasource=db dbtype=ODBC UPDATE tblField SET data1='Yes' , data2='Yes' WHERE strUsername='test' /cfquery WG From: FlashGuy [mailto:[EMAIL PROTECTED]] Hi, I need to update two fields in my database. For example, I have two fields called data1 and data2. THe below code updates only data1 field. Whats the correct syntax to also update data2 field at the same time? ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com
RE: Updating two fields
cfquery name=Update datasource=db dbtype=ODBC UPDATE tblField SET data1='Yes', data2='no' WHERE strUsername='test' /cfquery -Original Message- From: FlashGuy [mailto:[EMAIL PROTECTED]] Sent: Monday, December 09, 2002 8:22 AM To: CF-Talk Subject: Updating two fields Hi, I need to update two fields in my database. For example, I have two fields called data1 and data2. THe below code updates only data1 field. Whats the correct syntax to also update data2 field at the same time? cfquery name=Update datasource=db dbtype=ODBC UPDATE tblField SET data1='Yes' WHERE strUsername='test' /cfquery --- Colonel Nathan R. Jessop Commanding Officer Marine Ground Forces Guatanamo Bay, Cuba --- ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting.
Re: Updating two fields
cfquery name=Update datasource=db dbtype=ODBC UPDATE tblField SET data1='Yes', data2='No' WHERE strUsername='test' /cfquery HTH Clint - Original Message - From: FlashGuy [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Monday, December 09, 2002 8:22 AM Subject: Updating two fields Hi, I need to update two fields in my database. For example, I have two fields called data1 and data2. THe below code updates only data1 field. Whats the correct syntax to also update data2 field at the same time? cfquery name=Update datasource=db dbtype=ODBC UPDATE tblField SET data1='Yes' WHERE strUsername='test' /cfquery --- Colonel Nathan R. Jessop Commanding Officer Marine Ground Forces Guatanamo Bay, Cuba --- ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm
Re: Updating two fields
Quoting FlashGuy [EMAIL PROTECTED]: I need to update two fields in my database. For example, I have two fields called data1 and data2. THe below code updates only data1 field. Whats the correct syntax to also update data2 field at the same time? http://livedocs.macromedia.com/cfmxdocs/Developing_ColdFusion_MX_Applications_with_CFML/updateData4.jsp#1114106 http://www.mysql.com/doc/en/UPDATE.html Jochem ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm
RE: Updating two fields
Good Morning, Simply use a comma to separate the next database fields/value pair and continue your list cfquery name=Update datasource=db dbtype=ODBC UPDATE tblField SET data1='Yes', data2='anothervalue' WHERE strUsername='test' /cfquery ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com