update() public method

Update the database row with the given values.
public update ( array $p_columns = null, boolean $p_commit = true, boolean $p_isSql = false ) : boolean
$p_columns array Array of (Column_Name => Value)
$p_commit boolean If set to true, the value will be written to the database immediately. If set to false, the value will not be written to the database. Default is true.
$p_isSql boolean Set this to TRUE if the values of p_columns contains SQL commands. There is no way to know what the result of the command is, so we will need to refetch the row from the database in order to update the internal variable's value.
return boolean Return TRUE on success, FALSE on error.
Example #1
0
 /**
  * Update the language.
  *
  * @param array $p_values
  * @param boolean $p_commit
  * @param boolean $p_isSql
  * @return boolean
  */
 public function update($p_values = null, $p_commit = true, $p_isSql = false)
 {
     $success = parent::update($p_values, $p_commit, $p_isSql);
     if (!$success) {
         return false;
     }
     CampCache::singleton()->clear('user');
     return $success;
 }
Example #2
0
	/**
	 * Update the image data in the database.
	 *
	 * @param array $p_columns
	 * @param boolean $p_commit
	 * @param boolean $p_isSql
	 * @return boolean
	 */
	public function update($p_columns = null, $p_commit = true, $p_isSql = false)
	{
		$success = parent::update($p_columns, $p_commit, $p_isSql);
		if ($success) {
			if (function_exists("camp_load_translation_strings")) {
				camp_load_translation_strings("api");
			}
			$logtext = getGS('Changed properties for image "$1" ($2)', $this->m_data['Description'], $this->m_data['Id']);
			Log::Message($logtext, null, 43);
		}
		return $success;
	} // fn update
Example #3
0
	/**
	 * Update the language.
	 *
	 * @param array $p_values
	 * @param boolean $p_commit
	 * @param boolean $p_isSql
	 * @return boolean
	 */
	public function update($p_values = null, $p_commit = true, $p_isSql = false)
	{
		$success = parent::update($p_values, $p_commit, $p_isSql);
		if (!$success) {
			return false;
		}
		CampCache::singleton()->clear('user');
		if (function_exists("camp_load_translation_strings")) {
			camp_load_translation_strings("api");
		}
		$logtext = getGS('Language "$1" ($2) modified', $this->m_data['Name'], $this->m_data['OrigName']);
		Log::Message($logtext, null, 103);
		return $success;
	} // fn update
Example #4
0
 /**
  * Update the specified columns in the publication.
  *
  * A wrapper around the DatabaseObject::update(),
  * but this function logs a message after the update is complete
  * and notifies the Parser about the change.
  *
  * @param array $p_columns
  * @param boolean $p_commit
  * @param boolean $p_isSql
  * @return boolean
  */
 public function update($p_columns = null, $p_commit = true, $p_isSql = false)
 {
     $updated = parent::update($p_columns, $p_commit, $p_isSql);
     return $updated;
 }
 /**
  * Update data
  * @param array $p_columns
  * @return bool
  */
 public function update($p_columns = NULL)
 {
     // encode settings
     if (!empty($p_columns['settings'])) {
         $p_columns['settings'] = json_encode($p_columns['settings']);
     }
     parent::update($p_columns);
     return TRUE;
 }
Example #6
0
 public function update_no_password()
 {
     $value = self::$db_fields;
     self::$db_fields = self::$db_fields_no_password;
     parent::update();
     self::$db_fields = $value;
 }
Example #7
0
 public function update()
 {
     parent::update();
 }
Example #8
0
 public function update()
 {
     $this->password_encrypt();
     parent::update();
 }