<cfquery datasource="theDSN"> update tableName set first_name = <cfqueryparam cfsqltype="cf_sql_varchar" value="#newFirstName#" />, last_name = <cfqueryparam cfsqltype="cf_sql_varchar" value="#newLastName#" />, photo = <cfqueryparam cfsqltype="cf_sql_varchar" value="#photoUrl#" /> where record_id = <cfqueryparam cfsqltype="cf_sql_integer" value="#photoUrl#" /> </cfquery>
On Fri, Sep 9, 2011 at 5:15 AM, Scott Clayton <[email protected]>wrote: > > I am having issues with updating certain records in mySQL query. > > I have the code set up to list the first & last name of all the names in > database then when user selects person from list to edit. > Another screen pops up to allow them to edit their name &/or photo. Then > once they click on update then it's supposed to update the record with their > name & photo in mySQL?? Help!! > > mySQL database setup: > Column Headings > *record_id (primary key) > section_id > last_name > first_name > phone > photo > > (only the first & last name & photo needs to be updated in database-other > headings will be left alone) > > Edit Screen setup: > First & Last Name edit <cfinput type="text"> > Photo edit <cfinput type="file"> > > When click update record is not being updated in mySQL database. I need > assistance with the <cfupdate> or SQL update tags. > > > Scott > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-newbie/message.cfm/messageid:5558 Subscription: http://www.houseoffusion.com/groups/cf-newbie/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-newbie/unsubscribe.cfm
