Home  >  Article  >  Backend Development  >  joomla database operation sample code, joomla sample code_PHP tutorial

joomla database operation sample code, joomla sample code_PHP tutorial

WBOY
WBOYOriginal
2016-07-12 09:01:28883browse

joomla database operation sample code, joomla sample code

The examples in this article describe the joomla database operation method. Share it with everyone for your reference, the details are as follows:

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

I hope this article will be helpful to everyone’s PHP program design based on joomla.

Articles you may be interested in:

  • joomla jce editor solves the problem of failure to upload Chinese name files
  • Detailed sharing of the application of xml in joomla forms
  • Ajax's original application code in joomla
  • CKeditor and syntaxhighlight create joomla code highlighting
  • How to use joomla's built-in form validation function
  • Use configuration.php storage under Joomla Simple data
  • Understand Joomla, a PHP website management system from abroad

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/1089198.htmlTechArticlejoomla database operation sample code, joomla sample code This article describes the joomla database operation method with examples. Share it with everyone for your reference, the details are as follows: 1. jTable $row =$row-...
Statement:
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