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…
my = Mysql::new(“hostname”, “username”, “password”, “db”)
hasid = my.query(“SELECT id FROM table WHERE title = ‘Here is a title’”)
I get a result like…
I am expecting just the number in the id field. Any ideas?