src/Neuron/GameServer/Mappers/ChatMapper.php
public function addPrivateChatUpdate ($msgid, Neuron_GameServer_Player $from, Neuron_GameServer_Player $target)
	{
		$msgid = intval ($msgid);

		$db = Neuron_DB_Database::getInstance ();

		$db->query
		("
			DELETE FROM
				n_privatechat_updates
			WHERE
				pu_to = {$target->getId ()} AND
				pu_from = {$from->getId ()}
		");

		return $db->query
		("
			INSERT INTO
				n_privatechat_updates
			SET
				pu_from = {$from->getId ()},
				pu_to = {$target->getId ()},
				c_m_id = $msgid,
				pu_date = NOW()
		");
	}
public function addPrivateChatUpdate ($msgid, Neuron_GameServer_Player $from, Neuron_GameServer_Player $target)
	{
		$msgid = intval ($msgid);

		$db = Neuron_DB_Database::getInstance ();

		$db->query
		("
			DELETE FROM
				n_privatechat_updates
			WHERE
				pu_to = {$target->getId ()} AND
				pu_from = {$from->getId ()}
		");

		return $db->query
		("
			INSERT INTO
				n_privatechat_updates
			SET
				pu_from = {$from->getId ()},
				pu_to = {$target->getId ()},
				c_m_id = $msgid,
				pu_date = NOW()
		");
	}
CREATE TABLE  `n_privatechat_updates` (
`pu_id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`pu_from` INT NOT NULL ,
`pu_to` INT NOT NULL ,
`pu_date` DATETIME NOT NULL
) ENGINE = INNODB