![]() |
CMS Using second databaseconnection in 2 widgets Hi. I've created a widget which gets the data from an other database. So i've created a second db connection in the widget. Now i want 2 or more widgets which gets there data from the other connection. What would be the best way to do that? ATM i open the connection, send the query to get the data, close the connection. In the second widget the same thing is happening. Now i thought to create a singleton class for the db connection, so i don't have to open & close it in every widget. Would that be better? Where should i than close the connection? |
الساعة الآن 03:32 PM |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.5.2 TranZ By
Almuhajir