Joomla database operation sample code and joomla sample code. Joomla database operation sample code. joomla sample code this article describes how to operate the joomla database. For your reference, please refer to: 1. jTable $ row-joomla database operation sample code and joomla sample code.
This document describes how to operate the joomla database. We will share this with you 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 help you design PHP programs based on joomla.
Articles you may be interested in:
- Joomla jce editor solves the problem of uploading a Chinese name File
- Detailed application of xml in the joomla form
- Original application code of ajax in joomla
- CKeditor and syntaxhighlight build joomla code highlighting
- How to use the built-in form verification function of joomla
- Use configuration. php in Joomla to store simple data
- Learn about Joomla, a php website management system from abroad
Examples this article describes how to operate the joomla database. For your reference, see: 1. jTable $ row = $ row -...