In the file you attached, line 174 is:
$rows = mysql_num_rows($rstProductCategories);
this code is setting a variable named rows to the number of rows contained in the rstProductCategories recordset. I don't see how this code could produce the error you are reporting.
Could you post a link to where we could see the error? Maybe compress the original php file in zip archive and attach that?