core-bundle/src/Resources/contao/library/Contao/Model.php
public function refresh()
	{
		$intPk = $this->{static::$strPk};

		// Track primary key changes
		if (isset($this->arrModified[static::$strPk]))
		{
			$intPk = $this->arrModified[static::$strPk];
		}

		// Reload the database record
		$res = Database::getInstance()->prepare("SELECT * FROM " . static::$strTable . " WHERE " . Database::quoteIdentifier(static::$strPk) . "=?")
									   ->execute($intPk);

		$this->setRow($res->row());
	}
public function refresh()
	{
		$intPk = $this->{static::$strPk};

		// Track primary key changes
		if (isset($this->arrModified[static::$strPk]))
		{
			$intPk = $this->arrModified[static::$strPk];
		}

		// Reload the database record
		$res = Database::getInstance()->prepare("SELECT * FROM " . static::$strTable . " WHERE " . Database::quoteIdentifier(static::$strPk) . "=?")
									   ->execute($intPk);

		$this->setRow($res->row());
	}
public function refresh ( ) { $ intPk = $ this -> { static :: $ strPk } ; // Track primary key changes if ( isset ( $ this -> arrModified [ static :: $ strPk ] ) ) { $ intPk = $ this -> arrModified [ static :: $ strPk ] ; } // Reload the database record $ res = Database :: getInstance ( ) -> prepare ( "SELECT * FROM " . static :: $ strTable . " WHERE " . Database :: quoteIdentifier ( static :: $ strPk ) . "=?" ) -> execute ( $ intPk ) ; $ this -> setRow ( $ res -> row ( ) ) ; }
Reload the data from the database discarding all modifications
Reload the data from the database discarding all modifications