From: Frederick Cheung Date: 2008-01-18T03:21:26+09:00 Subject: Re: syntax error on SQL statement On 17 Jan 2008, at 17:06, laredotornado@zipmail.com wrote: > Hi, > > I'm using the latest version of Ruby for Fedora Core 6 Linux. I want > to write concise SQL statements, but the following > > @subscriber = Subscriber.find(:first, :conditions => "pharmacy_id > = ?", @pharmacy_id) > > @subscriber = Subscriber.find(:first, :conditions => ["pharmacy_id > = ?", @pharmacy_id]) Fred > is giving me the error: > > SyntaxError > /usr/local/apache2/htdocs/easyrx/app/controllers/ > register_controller.rb:44: syntax error, unexpected ')', expecting > tASSOC > @subscriber = Subscriber.find(:first, :conditions => "pharmacy_id > = ?", @pharmacy_id) > > > What's the correct way to write the statement? > > Thanks, - Dave >