I'm experiencing problems with a slow running query that takes more than 30 seconds to execute at times, I would therefore like to increase my sqlsrv_query timeout.
Fatal error: Maximum execution time of 30 seconds exceeded
I'm having trouble with my PHP syntax, as the examples at: http://php.net/manual/en/function.sqlsrv-query.php did not really make sense to me.
Currently my connection / setup looks as follows:
$testServer = 'IP\servername,PORT';
$testDetails = array('Database' => 'DBNAME', 'UID' => 'USERNAME', 'PWD' => 'Password');
$testConnect = sqlsrv_connect($testServer, $testDetails);
My understanding is that I need to pass the timout details through as parameters within sqlsrv_connect
but I'm not getting my syntax right.
(I have optimized the query as much as I can, unfortunately given the design of the db table I am not able to get it to return consistently in less than 30 seconds.)