On Mon, Dec 26, 2011 at 09:47:00AM -0800, Jeremy Evans wrote:
> 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)

That's what I get for reading Perl and Ruby at the same time. :)

Thanks,

-- 
Jason Dixon
DixonGroup Consulting
http://www.dixongroup.net/

-- 
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.

Reply via email to