Displaying 1 result from an estimated 1 matches for "newcategori".
Did you mean:
newcategory
2005 Nov 30
0
Passing variables with update_all
I''d like to produce an SQL update along the lines of:
UPDATE companies SET category2={newcategory} WHERE (category2 =
{oldcategory})
At the moment I''ve got:
ctype = params[:ctype]
Company.update_all("category2=ctype", "category2=ctype")
At present this returns a StatementInvalid:
Unknown column ''ctype'' in ''where clause'':