Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 Joomla 2.5。
我想在我的自定义 Jumi 模块中使用 Joomla 数据库实例,这样我就不必创建新的数据库连接。有什么办法吗?
认为这就是您要寻找的东西:
$db =& JFactory::getDBO(); //code for database connection $query = 'SELECT * FROM #__tablename'; //selects from table $db->setQuery($query);