From: Brian Candler Date: 2010-03-01T23:18:34+09:00 Subject: Re: find params Alex Moreno wrote: > > Thanks a lot for your answer. > > The problem is that map doesn卒t add commas, i get: > > title OR description LIKE ? AND title OR description LIKE ? > %pullmantur%%test% > > and i need > > title OR description LIKE ? AND title OR description LIKE ? > %pullmantur%,%test% > > > so i get this answer for more than 1 parameter: > > wrong number of bind variables (1 for 2) in: title OR description LIKE > ? AND title OR description LIKE ? If this is ActiveRecord then you don't want commas, you want an array like this: ["title OR description LIKE ? AND title OR description LIKE ?", "%pullmantur%", "%test%"] because each ? pulls the next value out of the array. So if you're getting only one bind variable instead of 2, it's because your queryArray has 1 element instead of 2. But if you're using a different DB access framework then YMMV. -- Posted via http://www.ruby-forum.com/.