joomla数据库操作示例代码,joomla示例代码_PHP教程

WBOY
Release: 2016-07-12 09:01:28
Original
836 people have browsed it

joomla数据库操作示例代码,joomla示例代码

本文实例讲述了joomla数据库操作的方法。分享给大家供大家参考,具体如下:

1、jTable

$row =& JTable::getInstance('comment', 'Table');
$row->load($id);
$row->bind(JRequest::get('post'))
$row->store()

Copy after login

2、jModel

$this->_db->setQuery($query);
$this->_db->loadObject();
$this->_getList($query, 0, 0); 

Copy after login

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();

Copy after login

希望本文所述对大家基于joomla的PHP程序设计有所帮助。

您可能感兴趣的文章:

  • joomla jce editor 解决上传中文名文件失败问题
  • xml在joomla表单中的应用详解分享
  • ajax在joomla中的原生态应用代码
  • CKeditor与syntaxhighlight打造joomla代码高亮
  • joomla内置的表单验证功能使用方法
  • Joomla下利用configuration.php存储简单数据
  • 了解Joomla 这款来自国外的php网站管理系统

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/1089198.htmlTechArticlejoomla数据库操作示例代码,joomla示例代码 本文实例讲述了joomla数据库操作的方法。分享给大家供大家参考,具体如下: 1、jTable $row =$row-...
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!