11175
(-- --)
1
I am trying something like this i want result which is between ? and ?
with one condition but query gives me sql syntax exception.
Group.find_by_sql(["select * from groups where lft BETWEEN (?) and (?)
and in_directory=?",self.lft,self.rgt, 1])
how i solve it.
I am trying something like this i want result which is between ? and ?
with one condition but query gives me sql syntax exception.
You don't need the () with between.
Fred
PS find_by_sql is unnecessary here.
:o
group = Group.find(:all,:conditions => ['lft BETWEEN ? and ? and in_directory= ? ',self.lft,self.right,1])
hope this might be ur looking