Get your pages all working before working on the .htaccess part. Then nothing needs to be done. All the .htaccess page does is it translates one url into a different one. So for instance http://www.domain.com/category/file-name becomes http://www.domain.com/category.php?id=file-name
If the url http://www.domain.com/category.php?id=file-name works to begin with, then nothing has to be changed to make it work once you add the .htaccess rule. I think you are doing too many things at once and confusing yourself about which one is causing the error. For instance you thought adding the recordset broke your link, but it was the .htaccess rule.
Then you thought the recordset broke the results, but really that was changing the other code on the page that you did trying to fix the first issue. Take it one step at a time and create new forum posts when you get stuck. Don't do .htaccess rule updates until the pages are fully functional.