From: Karthi kn Date: 2008-01-02T16:01:31+09:00 Subject: Re: how to pass variable value to a sql query Pradeepta Swain wrote: > Hi, > How can i pass a variable to a sql query like > > rs = dbh.prepare("select *from status_check where id=204") > rs.execute > > Instead of giving the value of id I want to make it dynamic ,where I can > pass the dynamic value of id fetched from database much like in PL/SQL . > How to do this .Anybody help !! rs = dbh.prepare("select *from status_check where id=#{value}") rs.execute -- Posted via http://www.ruby-forum.com/.