当前位置: 首页>>代码示例>>PHP>>正文


PHP JDatabase::Quote方法代码示例

本文整理汇总了PHP中JDatabase::Quote方法的典型用法代码示例。如果您正苦于以下问题:PHP JDatabase::Quote方法的具体用法?PHP JDatabase::Quote怎么用?PHP JDatabase::Quote使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在JDatabase的用法示例。


在下文中一共展示了JDatabase::Quote方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: save

 /**
  * Method to provide a shortcut to binding, checking and storing a JTable
  * instance to the database table.  The method will check a row in once the
  * data has been stored and if an ordering filter is present will attempt to
  * reorder the table rows based on the filter.  The ordering filter is an instance
  * property name.  The rows that will be reordered are those whose value matches
  * the JTable instance for the property specified.
  *
  * @param   mixed   $src             An associative array or object to bind to the JTable instance.
  * @param   string  $orderingFilter  Filter for the order updating
  * @param   mixed   $ignore          An optional array or space separated list of properties
  * to ignore while binding.
  *
  * @return  boolean  True on success.
  *
  * @link	http://docs.joomla.org/JTable/save
  * @since   11.1
  */
 public function save($src, $orderingFilter = '', $ignore = '')
 {
     // Attempt to bind the source to the instance.
     if (!$this->bind($src, $ignore)) {
         return false;
     }
     // Run any sanity checks on the instance and verify that it is ready for storage.
     if (!$this->check()) {
         return false;
     }
     // Attempt to store the properties to the database table.
     if (!$this->store()) {
         return false;
     }
     // Attempt to check the row in, just in case it was checked out.
     if (!$this->checkin()) {
         return false;
     }
     // If an ordering filter is set, attempt reorder the rows in the table based on the filter and value.
     if ($orderingFilter) {
         $filterValue = $this->{$orderingFilter};
         $this->reorder($orderingFilter ? $this->_db->quoteName($orderingFilter) . ' = ' . $this->_db->Quote($filterValue) : '');
     }
     // Set the error to empty and return true.
     $this->setError('');
     return true;
 }
开发者ID:NavaINT1876,项目名称:ccustoms,代码行数:45,代码来源:table.php

示例2: getCallbackParams

	public function getCallbackParams($form){
		$retArray = array();
		$this->db->setQuery("Select template_areas From #__facileforms_forms Where id = ".$this->db->Quote($form)."");
		$objList = $this->db->loadObjectList();
		$objListCount = count($objList);
		if($objListCount == 1){
			$retArray['areas'] = $objList[0]->template_areas;
		}
		return $retArray;
	}
开发者ID:rkern21,项目名称:videoeditor,代码行数:10,代码来源:easymode.class.php

示例3: _modTopicList

 protected function _modTopicList($data)
 {
     $result = array();
     $catid = intval($data);
     $user = KunenaFactory::getuser();
     if ($catid && $user->isModerator($catid)) {
         $query = "SELECT id, subject\n\t\t\t\t\t\t\tFROM #__kunena_messages\n\t\t\t\t\t\t\tWHERE catid={$this->_db->Quote($catid)} AND parent=0 AND moved=0\n\t\t\t\t\t\t\tORDER BY id DESC";
         $this->_db->setQuery($query, 0, 15);
         $topics_list = $this->_db->loadObjectlist();
         if ($this->_db->getErrorNum()) {
             $result = array('status' => '-1', 'error' => KunenaError::getDatabaseError());
         } else {
             $result['status'] = '1';
             $result['topiclist'] = $topics_list;
         }
     } else {
         $result['status'] = '0';
         $result['error'] = 'Error';
     }
     return $result;
 }
开发者ID:vuchannguyen,项目名称:hoctap,代码行数:21,代码来源:kunena.ajax.helper.php

示例4: save

 /**
  * Generic save function
  *
  * @access	public
  * @param	array	Source array for binding to class vars
  * @param	string	Filter for the order updating
  * @param	mixed	An array or space separated list of fields not to bind
  * @returns TRUE if completely successful, FALSE if partially or not succesful.
  */
 function save($source, $order_filter = '', $ignore = '')
 {
     if (!$this->bind($source, $ignore)) {
         return false;
     }
     if (!$this->check()) {
         return false;
     }
     if (!$this->store()) {
         return false;
     }
     if (!$this->checkin()) {
         return false;
     }
     if ($order_filter) {
         $filter_value = $this->{$order_filter};
         $this->reorder($order_filter ? $this->_db->nameQuote($order_filter) . ' = ' . $this->_db->Quote($filter_value) : '');
     }
     $this->setError('');
     return true;
 }
开发者ID:hrishikesh-kumar,项目名称:NBSNIP,代码行数:30,代码来源:table.php

示例5: saveFinalizeCode

	public function saveFinalizeCode(){
		$this->db->setQuery("Update #__facileforms_integrator_rules Set finalize_code = ".$this->db->Quote($_REQUEST['finalizeCode'])." Where id = ".JRequest::getInt('id',-1)."");
		$this->db->query();
	}
开发者ID:rkern21,项目名称:videoeditor,代码行数:4,代码来源:integrator.class.php

示例6: listRecords

	public function listRecords()
	{
                JToolBarHelper::title('<img src="'. JURI::root() . 'administrator/components/com_breezingforms/libraries/jquery/themes/easymode/i/logo-breezingforms.png'.'" align="top"/>');
		JToolBarHelper::custom('exportPdf',    'ff_download',             'ff_download_f2',             BFText::_('COM_BREEZINGFORMS_PDF'),    false);
		JToolBarHelper::custom('exportCsv',    'ff_download',             'ff_download_f2',             BFText::_('COM_BREEZINGFORMS_CSV'),    false);
		JToolBarHelper::custom('exportXml',    'ff_download',             'ff_download_f2',             BFText::_('COM_BREEZINGFORMS_XML'),    false);
		JToolBarHelper::custom('remove',    'delete.png',       'delete_f2.png',    BFText::_('COM_BREEZINGFORMS_TOOLBAR_DELETE'),    false);
		JToolBarHelper::custom('all',    'ff_switch',             'ff_switch_f2',             BFText::_('COM_BREEZINGFORMS_ALL'),    false);
		JToolBarHelper::custom('viewed',    'ff_switch',             'ff_switch_f2',             BFText::_('COM_BREEZINGFORMS_TOOLBAR_VIEWED'),    false);
		JToolBarHelper::custom('exported',  'ff_switch',             'ff_switch_f2',             BFText::_('COM_BREEZINGFORMS_TOOLBAR_EXPORTED'),  false);
		JToolBarHelper::custom('archived',  'ff_switch',             'ff_switch_f2',             BFText::_('COM_BREEZINGFORMS_TOOLBAR_ARCHIVED'),  false);

		JFactory::getDocument()->addStyleDeclaration(
			'

			.icon-32-ff_switch {
				background-image:url(components/com_breezingforms/images/icons/switch.png);
			}

			.icon-32-ff_switch_f2 {
				background-image:url(components/com_breezingforms/images/icons/switch_f2.png);
			}

			.icon-32-ff_download {
				background-image:url(components/com_breezingforms/images/icons/download.png);
			}

			.icon-32-ff_download_f2 {
				background-image:url(components/com_breezingforms/images/icons/download_f2.png);
			}

			'
		);

		//print_r($_REQUEST);
		$ids = JRequest::getVar('ids', array());
		$offset = JRequest::getInt('limitstart', 0);
		$limit  = JRequest::getInt('mylimit', 20);

		if(JRequest::getVar('task','') == 'all')
		{
			JFactory::getSession()->set('bfStatus', '');
		}
		else if(JRequest::getVar('task','')=='exported')
		{
			JFactory::getSession()->set('bfStatus', 'exported');
		}
		else if(JRequest::getVar('task','')=='archived')
		{
			JFactory::getSession()->set('bfStatus', 'archived');
		}
		else if(JRequest::getVar('task','')=='viewed')
		{
			JFactory::getSession()->set('bfStatus', 'viewed');
		}
		else if(JRequest::getVar('task','')=='remove')
		{
			$size = count($ids);
			for($i = 0; $i < $size; $i++)
			{
				$this->db->setQuery("Delete From #__facileforms_records Where id = " . $this->db->Quote($ids[$i]));
				$this->db->query();
				$this->db->setQuery("Delete From #__facileforms_subrecords Where record = " . $this->db->Quote($ids[$i]));
				$this->db->query();
				//echo $this->db->getQuery() . '<br/>';
			}
		}
		else if(JRequest::getVar('task','')=='save')
		{
			$id = JRequest::getInt('record_id', 0);
			$updates = JRequest::getVar('update', array());
			foreach($updates As $update)
			{
				$this->db->setQuery("Update #__facileforms_subrecords Set value = ".$this->db->Quote(JRequest::getVar('ff_nm_'.$update,''))." Where name = ".$this->db->Quote($update)." And record = " . $id);
				$this->db->query();
			}
		}
		else if(JRequest::getVar('task','')=='exportXml' && JRequest::getInt('exportt',0) == 1)
		{
			$this->expxml($ids);
		}
		else if(JRequest::getVar('task','')=='exportCsv' && JRequest::getInt('exportt',0) == 1)
		{
			$this->expcsv($ids);
		}
		else if(JRequest::getVar('task','')=='exportPdf' && JRequest::getInt('exportt',0) == 1)
		{
			$this->exppdf($ids);
		}

		if(JRequest::getInt('status_update',0) == 1)
		{
			$offset = 0;
			$limit = 20;
			JRequest::setVar('limitstart', 0);
			JRequest::setVar('mylimit', 20);
		}

		if(JRequest::getInt('id', 0) != '' && JRequest::getInt('viewed', -1) != -1)
		{
//.........这里部分代码省略.........
开发者ID:rkern21,项目名称:videoeditor,代码行数:101,代码来源:recordmanagement.class.php


注:本文中的JDatabase::Quote方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。