From: Brian Candler Date: 2012-08-09T02:36:05+09:00 Subject: Re: Help with database-related code pls Kaye Ng wrote in post #1071689: > person = $db.execute("SELECT * FROM people WHERE name = ? OR id = ?", > idorname, idorname.to_i).first Try adding after this line: p person or puts person.inspect Run the code. Then run it again without the ".first" and see what the difference is. Inspecting variables at various points in your program is a very simple but powerful way to help you understand what's going on. -- Posted via http://www.ruby-forum.com/.