Sql.update

can someone suggest better way to write following code

sql = ActiveRecord::Base.connection();
sql.execute "SET autocommit=0";
sql.begin_db_transaction
id, value =
sql.update "UPDATE `chsdesk3`.`members` SET mem_id=id ";
sql.commit_db_transaction
value;

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs