#1
Hello all,
Here is my home controller

at present my views/home.php is empty. All the content is loading from public/themes/default_aristaus/home/arc.php. arc.php page contains all static data.

I have another module success_stories. . In this module I am fetching all success stories from database. . Now I need to remove some static content from arc.php ( static success stories ) and need to display latest 3 success stories. And I need to include these latest 3 success stories in all remaining inner pages also. How to do that?
Thanks in advance.
Siri K
#2
Hello,
This will select the last 3 rows from success_stories, and then order them in ascending order.

#3
Hi,
:) sorry for miscommunication. I am not asking about the select query. I am asking about how to create a view file and call that view file in all inner pages.Here I was asking about the solution related to
Thanks
Siri K
#4
Hi all,
Here is my solution

I am calling this function in inner page where ever I need.
#5
Very good.
Here is something to think about when you do you do queries.
Using Query Bind Method is a very good security measure.
Here is the link for the Docs.
https://trongate.io/docs/information/the-query-bind-method

Dan
#6
Hi Dan
Thank you for your suggestion. But how can I use query_bind for the normal select query like below?

Thanks
Siri K