I have a name stored in the variable username and would like to pull users row information when I try
result = dbh.query("SELECT * FROM maintab WHERE user = '#{username}'")
I get no results. If I put in the username by hand however, it does return a result. How format my query so that I may use variables?
usernamevariable isn't nil or emty?DB[:maintab].filter(:user => username)orDB['select * from maintab where user = ?', username]