本文实例讲述了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程序设计有所帮助。
【说明】:本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:)!