When used in the Server Action, does it act the same, no results?
Try replacing :P1 and :P2 in the query with ?.
:P1
:P2
?