syntax error on SQL statement

L

laredotornado

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)

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
 
F

Frederick Cheung

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top