You want it right before line 191:
$WADAproducts = mysql_query($query_WADAproducts, $PowerCMSConnection) or die(mysql_error());
that is the line the is connecting to the database and giving the error. So adding that to line 190 will let you see the query being used so that we can try to spot the issue.