Joomla database operation sample code, joomla sample code _ PHP Tutorial

Source: Internet
Author: User
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 -...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.