Query for function in SL

Can you help.

I need make a query in function and query have compare for 2 arguments of function. (what syntax)

 

 

function fName(arg1, arg2)
...
if (var findRecord=currentFile.doSelect(arg1=arg2) == RC_SUCCESS)
...