Skip navigation links

MySQL Forums


Advanced Search

Ruby Mysql inset variable
Posted by: Raveendran P ()
Date: July 01, 2008 11:48PM

Hi All,


k = "50"

my = Mysql::new("localhost", "root", "pass", "table")
my.query("INSERT INTO table VALUES('2008-05', #{k}, 324)")

./Class.rb:212:in `query': Unknown column '50' in 'field list'
(Mysql::Error)

How do I insert a variable into a row?

Thanks

P.Raveendran (Bug Identifier Justin)
http://raveendran.wordpress.com

Options: ReplyQuote


Subject Written By Posted
Ruby Mysql inset variable Raveendran P 07/01/2008 11:48PM
Re: Ruby Mysql inset variable Raveendran P 08/22/2008 10:08PM


Sorry, you can't reply to this topic. It has been closed.