Hi Rob,
It'll be something like ...
<?php
$sql = "SELECT DISTINCT item FROM saleshistory";
$res = mysql_query($sql);
$num_unique_items = mysql_num_row($res);
?>
Paul 🙂
PS. The best way to get a response usually is to try and show how far you've got already, and try and show exactly where your problems lies.
Since you're new, it might be worth having a read of the forum guidelines.