Hi all, with following fields
apigroup_name=production ------> (single table) loginid=43 [email protected] clientapp= ActiveRecord::Base.connection.execute("SELECT `sdm_users`.`loginid`,`sdm_users`.id,`sdm_users`.`email`,`api_groups`.`name`,`api_groups`.`is_autokey_generate`,`api_groups`.`id` FROM `sdm_users`,`api_groups` WHERE `sdm_users`.`loginid` ='#{loginid}' && `sdm_users`.`status` = true && `api_groups`.`name`= ('#{apigroup_name}')") By the above query i can retrieve all fields from db, What i want to do now is to apigroup_name=["production","marketing"] ------> (multiple table) loginid=43 [email protected] want to retrieve all the fields from db, clientapp= ActiveRecord::Base.connection.execute("SELECT `sdm_users`.`loginid`,`sdm_users`.id,`sdm_users`.`email`,`api_groups`.`name`,`api_groups`.`is_autokey_generate`,`api_groups`.`id` FROM `sdm_users`,`api_groups` WHERE `sdm_users`.`loginid` ='#{loginid}' && `sdm_users`.`status` = true && `api_groups`.`name` IN ('#{apigroup_name}')") it is not working can anybody help me -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

