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

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,743
    Jordan
    Feb 10, 2004
  2. Amit
    Replies:
    6
    Views:
    14,248
    Assimalyst
    Oct 24, 2006
  3. Replies:
    2
    Views:
    1,072
    Kevin Grover
    Oct 20, 2006
  4. Replies:
    9
    Views:
    1,294
  5. JcFx
    Replies:
    0
    Views:
    508
  6. Vivek Nallur

    value binding and function binding

    Vivek Nallur, Sep 25, 2003, in forum: Ruby
    Replies:
    0
    Views:
    244
    Vivek Nallur
    Sep 25, 2003
  7. Dumaiu
    Replies:
    3
    Views:
    287
    Dumaiu
    Mar 20, 2006
  8. Jörg Weule
    Replies:
    20
    Views:
    1,558
    Arno Welzel
    Dec 2, 2011
Loading...