for beginners, here is a small php code to hide your affiliate links (inside the mysql)

<?php
$dblink = mysql_connect("localhost","mysql_user", "mysql_password");

$result = mysql_db_query("dbname","select * from tablename where id='$sku'");
$row = mysql_fetch_array($result);
$link = $row["link"];
// mysql_query("update tablename set click=click+1 where id='$sku'"); // increase click count to track your clicks
header("Location: $link"); // send an http header with your affiliate link
mysql_free_result($result);
mysql_close($dblink);
?>

so in place of your affiliate link, you use "script.php?sku=NNN"

so you'll need to create a mysql table with 3 fields, id is primary/unique, link for links and click for tracking click count

This much is free! If you want a custom solution, call me..