<?php
	
	function get_user_item($user_id, $id)
	{
		
		$query	=	@mysql_query(sprintf(
			'SELECT
					`inv`.*,
					`shop`.`type`,
					`shop`.`name`,
					`shop`.`str`,
					`shop`.`dex`,
					`shop`.`life`,
					`shop`.`protection`
				FROM
					`inv`
				LEFT JOIN
					`shop`
				ON
					`shop`.`id`	=	`inv`.`shop_id`
				WHERE
					`inv`.`user_id`	=	%d AND	`inv`.`id`	=	%d',
			$user_id,
			$id
		));
		
		if (@mysql_num_rows($query) != 0)
		{
			
			$item	=	@mysql_fetch_assoc($query);
			
			return $item;
			
		}
		
	}
	
	
?>