tags:

views:

72

answers:

1

Hello all,

I am using PHP SQL Server driver - is there a way to kill the last query sent by sqlsrv_query function?

If not, if I kill the PHP process will it also kill the query in turn?

I appreciate any help.

+2  A: 

Yes you can do this.

Take a look at MySQL's kill command, that should help you with what query to use.

When do you want to invoke it? If its inline with your PHP, then just write up a query and execute it. If you want to do it if the page is closed, you may want to consider setting up a second PHP page that runs the command, and then hitting it with AJAX with JavaScript's event for closing pages.

Comment if you have any questions

Gausie
Thanks but I was hoping the same for SQL Server using a function call from the PHP Module Driver for SQL Server.
Abs
Ooh sorry - didn't notice it was SQL Server. Why do it from a module driver if you can just use a SQL query? All a function in the module would do is call this query
Gausie