直接在rails 跑 SQL
方法:ActiveRecord::Base.connection.execute()
sql = "select * from products where del_mark=0 order by name asc"
@ccte = ActiveRecord::Base.connection.execute(sql)
sql = "select * from products where del_mark=0 order by name asc"
@ccte = ActiveRecord::Base.connection.execute(sql)
留言
張貼留言