$res = $srvr->ask($SQL,@params); if ($res == SRVR_ACK && SRVR_WAIT) { # set up something to check back for results later } else { # deal with the results }