From: David Morton Date: 2008-01-02T13:11:15+09:00 Subject: Re: how to pass variable value to a sql query -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Jan 1, 2008, at 9:45 PM, 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 !! > -- > Posted via http://www.ruby-forum.com/. > look up "placeholders". A google search yielded: http://www.kitebird.com/articles/ruby-dbi.html#TOC_8 David Morton Maia Mailguard http://www.maiamailguard.com mortonda@dgrmm.net -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (Darwin) iD8DBQFHew7gUy30ODPkzl0RAsIKAJ4kBWKmfTmF0k083dj2yAIK+4ZsrgCeOHWV iqgUQG+oXnKiR0ZBH8NyEHQ= =eXia -----END PGP SIGNATURE-----