Smarty Block: How To Query Database On Websites Start Page

Dear all!
On the home page of the website there is a "Counter" section that displays interesting figures.
Currently these numbers are hard coded in HTML (Website > Pages).
However, I would like to make them dynamic, i.e. populate the counters from the database. For this purpose there is a table "cscart_my_counter_table" (which would be updated by a CRON job every 10 minutes).
Is there a way to query this table? Can this be done with a Smarty Block for example?
I am looking forward to your support!
Best regards


Yes, you can use the following code in your template

{$data = "SELECT * FROM ?:my_counter_table"|db_get_array}

second line will output the result

Thank you, eComLabs! Smarty syntax is a bit strange, but it works. :-)