binding variables

Discussion in 'Ruby' started by Matthew Campbell, Feb 2, 2010.

  1. Hi,

    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

    Thanks
    --
    Posted via http://www.ruby-forum.com/.
     
    Matthew Campbell, Feb 2, 2010
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jordan
    Replies:
    2
    Views:
    2,571
    Jordan
    Feb 10, 2004
  2. Amit
    Replies:
    6
    Views:
    13,915
    Assimalyst
    Oct 24, 2006
  3. Replies:
    2
    Views:
    907
    Kevin Grover
    Oct 20, 2006
  4. Replies:
    9
    Views:
    1,008
  5. JcFx
    Replies:
    0
    Views:
    315
Loading...

Share This Page