我在joomla 3中有两种方法,它们使用相同的数据库connection.How,我可以这样做,我选择这样做,在model.But中创建costruct方法中的数据库连接work.Please帮助
发布于 2015-04-14 16:45:35
例如,如果您有两个方法method1() & method2(),您可以创建第三个方法db_connection()。在method1 & method2中,您可以这样调用
$con=$this->db_connection();顺便说一下,在joomla,我们通过
$con=JFactory::getDbo();https://stackoverflow.com/questions/29515447
复制相似问题