Get data from Mysql

Hi, I'm kinda in a hurry to make this work. So, here is my questions.

I have follow tutorial here on how to get data from mysql:

Is there a way I can access the data without using the button? I am trying to display data from mysql automatically when user go to Screen1. Trying put the code get in init function does not work for me.

And how to refresh the data every 5 minutes?

I am new to coding. Sorry and thanks!
1 person has
this question