sql.update

4 views
Skip to first unread message

chandrakant jain

unread,
Sep 25, 2011, 12:50:47 PM9/25/11
to Ruby on Rails: Talk
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;
Reply all
Reply to author
Forward
0 new messages