Answer the question
In order to leave comments, you need to log in
Loop and value by reference?
I guess that it’s impossible to do this, but I don’t understand how it’s possible - the task is to read several records from the database and give them to the presto renderer. Correct me please.
I do not want to use object access yet - the task is too simple. Forgive me if this is a dumb question - I just started learning ruby.
@entries =[]
$dbh.select_all('select * from test order by test_id desc') do |row|
p row
@entries.push(row)
end
p @entries
p $dbh.select_all('select * from test order by test_id desc')
view.render
[3, "\u0420\u0430\u043C\u0443"]
[2, "\u041C\u044B\u043B\u0430"]
[1, "\u041C\u0430\u043C\u0430"]
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question