heres a simple script that quantifies a users items everytime they look at their inventory, so for all intents and purposes, there items are always quantified Smiley

inventory.php
find
Code:

$h->menuarea();


after it add
Code:

for($il=0;$il<74;$il++)
{
	$item=mysql_query("SELECT * FROM inventory WHERE inv_userid=$userid AND inv_itemid=$il AND inv_qty > 0",$c);  
	$gotitem = mysql_num_rows($item);
	if($gotitem == 0)
	{
		$h=2;
	}
	else
	{
		$z=0; 
		$id = $il;
		while ($i=mysql_fetch_array($item)) 
		{ 
		   $z=$z+$i['inv_qty']; 
		}
		mysql_query("DELETE FROM inventory WHERE inv_userid=$userid AND inv_itemid=$id",$c); 
		mysql_query("INSERT INTO inventory VALUES ('', '$id', '$userid', '$z')",$c); 
	}
}


change the 74 to whatever the highest itemID you have is. 