Binding variables


Just trying to pick up ruby and have a problem with binding variables to
postgres query.

I have
query = conn.exec(“SELECT id FROM xxx where id=$1”,4)

However, get “Exception: uninitialized constant Postgres” . I am using
the ruby-pg gem.

Any suggestions


This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs