Custom sql query

Hello.

How can I run custom slq query? I want to delete all rows from table,
which is not mapped to activerecord model. Thanks.

Fero.

On 7 Apr 2008, at 16:19, Frantisek P. wrote:

Hello.

How can I run custom slq query? I want to delete all rows from table,
which is not mapped to activerecord model. Thanks.

ActiveRecord::Base.connection.execute ‘…’

(there’s also ActiveRecord::Base.connection.delete,
ActiveRecord::Base.connection.insert,
ActiveRecord::Base.connection.update etc… which you should use if
possible as these will invalidate the query cache)

Fred