framework/base/CDbStatePersister.php
public function save($state)
	{
		$command=$this->db->createCommand();
		if(false===$this->exists())
			return $command->insert($this->stateTableName,array(
				$this->keyField=>Yii::app()->name,
				$this->valueField=>serialize($state)
			));
		else
			return $command->update($this->stateTableName,array($this->valueField=>serialize($state)),
				$this->db->quoteColumnName($this->keyField).'=:key',
				array(':key'=>Yii::app()->name)
		);
	}
public function save($state)
	{
		$command=$this->db->createCommand();
		if(false===$this->exists())
			return $command->insert($this->stateTableName,array(
				$this->keyField=>Yii::app()->name,
				$this->valueField=>serialize($state)
			));
		else
			return $command->update($this->stateTableName,array($this->valueField=>serialize($state)),
				$this->db->quoteColumnName($this->keyField).'=:key',
				array(':key'=>Yii::app()->name)
		);
	}
public function save ( $ state ) { $ command = $ this -> db -> createCommand ( ) ; if ( false === $ this -> exists ( ) ) return $ command -> insert ( $ this -> stateTableName , array ( $ this -> keyField => Yii :: app ( ) -> name , $ this -> valueField => serialize ( $ state ) ) ) ; else return $ command -> update ( $ this -> stateTableName , array ( $ this -> valueField => serialize ( $ state ) ) , $ this -> db -> quoteColumnName ( $ this -> keyField ) . '=:key' , array ( ':key' => Yii :: app ( ) -> name ) ) ; }
Saves application state in persistent storage.
@param mixed $state state data (must be serializable).
@return int
Saves application state in persistent storage .