src/Neuron/GameServer/Mappers/ChatMapper.php
public function getPrivateChatUpdates (Neuron_GameServer_Player $target, $since = null)
	{
		$db = Neuron_DB_Database::getInstance ();

		if (isset ($since))
		{
			$data = $db->query
			("
				SELECT
					*
				FROM
					n_privatechat_updates
				WHERE
					pu_id > ".intval($since)." AND
					pu_to = {$target->getId ()}
			");
		}

		else
		{
			$data = $db->query
			("
				SELECT
					*
				FROM
					n_privatechat_updates
				WHERE
					pu_to = {$target->getId ()}
				ORDER BY
					pu_id DESC
				LIMIT
					1
			");
		}

		return $data;
	}
public function getPrivateChatUpdates (Neuron_GameServer_Player $target, $since = null)
	{
		$db = Neuron_DB_Database::getInstance ();

		if (isset ($since))
		{
			$data = $db->query
			("
				SELECT
					*
				FROM
					n_privatechat_updates
				WHERE
					pu_id > ".intval($since)." AND
					pu_to = {$target->getId ()}
			");
		}

		else
		{
			$data = $db->query
			("
				SELECT
					*
				FROM
					n_privatechat_updates
				WHERE
					pu_to = {$target->getId ()}
				ORDER BY
					pu_id DESC
				LIMIT
					1
			");
		}

		return $data;
	}
public function getPrivateChatUpdates ( Neuron_GameServer_Player $ target , $ since = null ) { $ db = Neuron_DB_Database :: getInstance ( ) ; if ( isset ( $ since ) ) { $ data = $ db -> query ( "
				SELECT
					*
				FROM
					n_privatechat_updates
				WHERE
					pu_id > " . intval ( $ since ) . " AND
					pu_to = {$target->getId ()}
			" ) ; } else { $ data = $ db -> query ( "
				SELECT
					*
				FROM
					n_privatechat_updates
				WHERE
					pu_to = {$target->getId ()}
				ORDER BY
					pu_id DESC
				LIMIT
					1
			" ) ; } return $ data ; }
If $since is said, return all events since "since".
If $since is not said, return the single latest event.

($since is obviously the pu_id)
If $since is said return all events since since . If $since is not said return the single latest event .