From: Manish Sharma Date: 2009-10-14T23:47:51+09:00 Subject: Re: Ruby sql question Leslie Viljoen wrote: > On Wed, Oct 14, 2009 at 4:24 PM, Manish Sharma > wrote: >> Hi, >> >> Im using ActiveRecord to find something. >> >> <% @new = User.find_by_sql("SELECT * FROM users WHERE users.id NOT IN >> (array)") %> >> >> Now, i can't seem to make it look through the array. I had a look for >> this problem in other languages and in php its simply $array. > > Perhaps: > "SELECT * FROM users WHERE users.id NOT IN (#{array.join(', ')})" Just an extra question though. what does the array.join(',') do? -- Posted via http://www.ruby-forum.com/.