Are you specifying your WHERE in the webpart or in the query? Better to do it in the webpart and specify the WHERE macro in the query for this reason. Your query should be something like:
SELECT * FROM YourTableOrView WHERE ##WHERE## ORDER BY ##ORDERBY##
Then in your where statement on the webpart, add your macro condition nodeId in (SELECT FavoriteDocumentID from T4G_Favourites WHERE UserID = {% CurrentUser.UserID @%})
using the macro editor for that field.