I know how to get all Mysql Results from a table and output it with each_hash.do in Ruby like this
results = con.query "SELECT * FROM table"
#results.each_hash do |row|
  $url = row["Url"]
  $name = row["linkname"]
  $id = row["ID"]
  #end
But how can i get only one record extracted from results?