On Dec 26, 9:32 am, Jason Dixon <[email protected]> wrote: > I'm trying to replace my original queries with bound variables but I'm > doing something wrong. Here's a sample query (with the original > commented out) that ends up returning nothing. > > #@user = User.filter(:username => session[:user], :site_id => 1).first > ds = User.filter(:username => $u, :site_id => $s) > @user = ds.call(:first, :u => session[:user], :s => 1) > > Any suggestions?
You are using global variables, not symbols. You want: ds = User.filter(:username => :$u, :site_id => :$s) Jeremy -- You received this message because you are subscribed to the Google Groups "sequel-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/sequel-talk?hl=en.
