From: Paul Willis Date: 2007-03-26T22:19:04+09:00 Subject: Ruby/MySQL SELECT results Hi I am playing with Ruby/MySQL, I have everything installed ok. I can INSERT into my database but I am having trouble with SELECT. I want to see if the text in the field 'title' has been used before and if it has return the id of that row. If I run... require "mysql" my = Mysql::new("hostname", "username", "password", "db") hasid = my.query("SELECT id FROM table WHERE title = 'Here is a title'") puts hasid I get a result like... # I am expecting just the number in the id field. Any ideas? Paul -- Posted via http://www.ruby-forum.com/.