in the recordset, filter using the Categorylink column and the catlink URL variable.
if you are trying to get the related products, your recordset should use a join query.
see the following page:
http://www.w3schools.com/sql/sql_join.asp
Note, you say:
now if i use, $_GET['Categorylink']
the url variable that is created by your rewrite rule is name "catlink" not "Categorylink"
RewriteRule ^categories/(.*)$ category-details.php?catlink=$1 [NC,L,QSA,T=application/x-httpd-php]