joomla数据库操作示例代码
本文实例讲述了joomla数据库操作的方法。分享给大家供大家参考,具体如下:
1、jTable
$row =& JTable::getInstance('comment', 'Table'); $row->load($id); $row->bind(JRequest::get('post')) $row->store()
2、jModel
$this->_db->setQuery($query); $this->_db->loadObject(); $this->_getList($query, 0, 0);
3、jFactory
$db =& JFactory::getDBO(); $query = "SELECT count(*) FROM #__reviews"; $db->setQuery( $query ); $total = $db->loadResult(); $query = "SELECT * FROM #__reviews"; $db->setQuery( $query,$limitstart, $limit ); $rows = $db->loadObjectList();
希望本文所述对大家基于joomla的PHP程序设计有所帮助。
相关推荐
godfather 2020-06-03
Liuzqi 2015-04-13
89447517 2011-07-28
走向WEB开发 2010-12-03
austindev 2017-01-14
ithover 2015-04-13
JAVA飘香 2019-06-26
wangdoudou0 2013-07-09
海欣海夜 2013-06-04
AnyBisks 2013-02-21
RENYUAN 2011-04-17
kukelook 2018-12-28
新开源王 2017-06-28
83133756 2016-10-18
logobitch 2011-12-31
ROES 2017-12-07
xujinweigingko 2018-03-21
Scalzdp 2018-12-28